-
Notifications
You must be signed in to change notification settings - Fork 99
Format #948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format #948
Conversation
02237e4 to
589adbe
Compare
589adbe to
7ee4db3
Compare
5bdb84d to
e0d2c9a
Compare
0b99883 to
adc8462
Compare
adc8462 to
2e44a43
Compare
301f9e7 to
eb06a81
Compare
eb06a81 to
e60cab2
Compare
0094a3d to
263c515
Compare
40d2f58 to
1c027b9
Compare
|
Issues
======
+ Solved 21
- Added 11
Clones added
============
- examples/simulation/Tutorial2/src/FairTutorialDet2.cxx 1
- trackbase/FairTrackParP.h 1
- fairtools/FairMonitor.cxx 2
- parbase/FairRuntimeDb.cxx 2
- templates/project_root_containers/NewDetector/NewDetector.cxx 1
- examples/simulation/Tutorial1/src/FairFastSimExample.cxx 1
- geane/FairGeanePro.cxx 2
- examples/simulation/Tutorial1/src/FairTutorialDet1.cxx 1
- examples/simulation/Tutorial1/src/FairFastSimExample2.cxx 1
- examples/simulation/rutherford/src/FairRutherford.cxx 1
- templates/NewDetector_root_containers/NewDetector.cxx 1
- templates/project_stl_containers/NewDetector/NewDetector.cxx 1
- examples/MQ/pixelSimSplit/src/devices/FairMQChunkMerger.cxx 2
- examples/MQ/pixelDetector/src/Pixel.cxx 1
- trackbase/FairTrackParH.h 1
- examples/simulation/Tutorial4/src/mc/FairTutorialDet4.cxx 1
- templates/NewDetector_stl_containers/NewDetector.cxx 1
- examples/advanced/propagator/src/FairTutPropDet.cxx 1
- trackbase/FairGeaneUtil.h 3
- examples/MQ/pixelDetector/src/devices/FairMQPixelMerger.cxx 2
See the complete overview on Codacy |
| cout << "Event number: " << eventID << "\tNtracks: " << ntracks << endl; | ||
|
|
||
| for (Int_t ll = 0; ll < ntracks; ll++) { | ||
| ncols = fscanf(fInputFile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| f_evt_swap_filhe(ps_bufhe); | ||
| } | ||
| if (l_prihe) { | ||
| ii = f_evt_type(ps_bufhe, NULL, 0, 0, 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| s_server.sock_name.sin_addr.s_addr = htonl(INADDR_ANY); | ||
| s_server.sock_name.sin_port = htons(*pl_port); | ||
|
|
||
| retval = bind(s_server.sock_rw, (struct sockaddr*)&s_server.sock_name, sizeof(s_server.sock_name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| while (nullptr != fgets(str, 100, file)) { | ||
| if (TString(str).Contains("treename")) { | ||
| char* treename = new char[100]; | ||
| if (1 == sscanf(str, "treename=%s", treename)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pMbsHeader->iType); | ||
| if (iVerbose) { | ||
| if (pMbsHeader) { | ||
| printf("ElHd: words:%d type:%08x\n", pMbsHeader->iWords, pMbsHeader->iType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (iUseOffset == LMD__INDEX) { | ||
| fLmdOffsetResize(pLmdControl, iReturn / 4); | ||
| } // create and set first value | ||
| printf("fLmdPutOpen: %s. Bytes:%d over:%d table:%d large:%d.\n", Filename, iBytes, iOver, iUseOffset, iLargeFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| while (nullptr != fgets(str, 100, file)) { | ||
| if (TString(str).Contains("foldername")) { | ||
| char* foldername = new char[100]; | ||
| if (1 == sscanf(str, "foldername=%s", foldername)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| LOG(debug) << "GOT NEW EVENT " << fMCEntryNo << " (part " << fPartNo << ") with run id = " << fRunId; | ||
| } | ||
| if (buffer.find("EVENT") == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return (GETLMD__EOFILE); | ||
| } | ||
| if (iReturn != used) { | ||
| printf("fLmdGetBuffer: LMD read error: unexpected EOF: %s %u %u\n", pLmdControl->cFile, iReturn, used); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (pbuf == NULL) { | ||
| pbuf = (char*)pLmdControl->pOffset8; | ||
| } | ||
| iReturn = fLmdWriteBuffer(pLmdControl, pbuf, (pLmdControl->iElements + 1) * pLmdControl->iOffsetSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cout << "Event number: " << eventID << "\tNtracks: " << ntracks << endl; | ||
|
|
||
| for (Int_t ll = 0; ll < ntracks; ll++) { | ||
| ncols = fscanf(fInputFile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
I mainly looked at the script part and less at the actual formatting. Probably not a bad idea, if someone else looks at that too. |
Just as a basis for discussion, feel free to change/ignore.
This is the format we use in FairMQ, it uses Mozilla format as the base.
Here you can find what each entry means.
Your favorite editor should have a feature/plugin to apply these rules to a file/section of code via button press/mouse click to try it out.
.clang-formatfile.*\.(h|hpp|c|C|cpp|cxx|tpl)$).