Skip to content

Commit 89a34b3

Browse files
committed
Clang-format
Update authors
1 parent da67b5f commit 89a34b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5289
-4700
lines changed

.clang-format

+53-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
11
---
2-
BasedOnStyle: Google
2+
Language: Cpp
3+
#AccessModifierOffset: -4
4+
ConstructorInitializerIndentWidth: 4
5+
AlignEscapedNewlinesLeft: true
6+
AlignTrailingComments: true
7+
AllowAllParametersOfDeclarationOnNextLine: false
8+
AllowShortIfStatementsOnASingleLine: false
9+
AllowShortLoopsOnASingleLine: false
10+
AllowShortFunctionsOnASingleLine: true
11+
AlwaysBreakTemplateDeclarations: true
12+
13+
# It is broken on windows. Breaks all #include "header.h"
14+
#AlwaysBreakBeforeMultilineStrings: true
15+
16+
BreakBeforeBinaryOperators: false
17+
BreakBeforeTernaryOperators: true
18+
BreakConstructorInitializersBeforeComma: true
19+
BinPackArguments: false
20+
BinPackParameters: false
21+
ColumnLimit: 120
22+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
23+
DerivePointerBinding: false
24+
ExperimentalAutoDetectBinPacking: false
25+
IndentCaseLabels: true
26+
MaxEmptyLinesToKeep: 1
27+
NamespaceIndentation: All
28+
ObjCSpaceAfterProperty: false
29+
ObjCSpaceBeforeProtocolList: false
30+
PenaltyBreakBeforeFirstCallParameter: 1
31+
PenaltyBreakComment: 300
32+
PenaltyBreakString: 1000
33+
PenaltyBreakFirstLessLess: 120
34+
PenaltyExcessCharacter: 1000000
35+
PenaltyReturnTypeOnItsOwnLine: 200
36+
PointerBindsToType: true
37+
SpacesBeforeTrailingComments: 1
38+
Cpp11BracedListStyle: false
39+
Standard: Cpp11
40+
IndentWidth: 4
41+
TabWidth: 4
42+
UseTab: Never
43+
BreakBeforeBraces: Allman
44+
IndentFunctionDeclarationAfterType: true
45+
SpacesInParentheses: false
46+
SpacesInAngles: false
47+
SpaceInEmptyParentheses: false
48+
SpacesInCStyleCastParentheses: false
49+
SpacesInContainerLiterals: true
50+
SpaceBeforeAssignmentOperators: true
51+
ContinuationIndentWidth: 4
52+
CommentPragmas: '^ IWYU pragma:'
53+
SpaceBeforeParens: ControlStatements
54+
...

apply-format.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/bash
2-
find -type f | grep -e '.(\.C\|\.cpp\|\.cxx\|\.h)$' | grep -v ^./macros | xargs -L 1 clang-format-15 -i
2+
find . -type f \( -name "*.cpp" -o -name "*.cxx" -o -name "*.h" \) \
3+
! -path "./macros/*" ! -path "./params/*" -print0 |
4+
xargs -0 -L 1 clang-format-15 -i
5+
36
echo "Use git add -A ; git commit -m \"clang-format all files\" --author=\"white space <[email protected]>\" to commit changes."
7+

asydata/chimeraData/R3BAsyChimeraArrayData.cxx

+54-45
Original file line numberDiff line numberDiff line change
@@ -16,51 +16,60 @@
1616
#include "FairLogger.h"
1717

1818
R3BAsyChimeraArrayData::R3BAsyChimeraArrayData()
19-
: fMulti(0),
20-
fNumTel(0),
21-
fFastHG(0),
22-
fFastLG(0),
23-
fSlowHG(0),
24-
fSlowLG(0),
25-
fTimeCsI(0),
26-
fSilHG(0),
27-
fSilLG(0),
28-
fTimeSil(0),
29-
fMultiCsI(0),
30-
fMultiSil(0) {}
31-
32-
R3BAsyChimeraArrayData::R3BAsyChimeraArrayData(UInt_t multi, UInt_t* numtel,
33-
UInt_t* fastHG, UInt_t* fastLG,
34-
UInt_t* slowHG, UInt_t* slowLG,
35-
UInt_t* timeCsI, UInt_t* silHG,
36-
UInt_t* silLG, UInt_t* timeSil,
37-
UInt_t multiCsI, UInt_t multiSil)
38-
: fMulti(multi),
39-
fNumTel(numtel),
40-
fFastHG(fastHG),
41-
fFastLG(fastLG),
42-
fSlowHG(slowHG),
43-
fSlowLG(slowLG),
44-
fTimeCsI(timeCsI),
45-
fSilHG(silHG),
46-
fSilLG(silLG),
47-
fTimeSil(timeSil),
48-
fMultiCsI(multiCsI),
49-
fMultiSil(multiSil) {
50-
// fMulti=multi;
51-
// LOG(info) << "R3BAsyChimeraArrayData::new entry";
52-
53-
/*
54-
fDet=new UInt_t[multi];
55-
fSide=new UInt_t[multi];
56-
fStrip=new UInt_t[multi];
57-
fRawEnergy=new UInt_t[multi];
58-
fRawTime=new UInt_t[multi];
59-
fDet=detector;
60-
fSide=side;
61-
fStrip=strip;
62-
fRawEnergy=energy;
63-
fRawTime=time;*/
19+
: fMulti(0)
20+
, fNumTel(0)
21+
, fFastHG(0)
22+
, fFastLG(0)
23+
, fSlowHG(0)
24+
, fSlowLG(0)
25+
, fTimeCsI(0)
26+
, fSilHG(0)
27+
, fSilLG(0)
28+
, fTimeSil(0)
29+
, fMultiCsI(0)
30+
, fMultiSil(0)
31+
{
32+
}
33+
34+
R3BAsyChimeraArrayData::R3BAsyChimeraArrayData(UInt_t multi,
35+
UInt_t* numtel,
36+
UInt_t* fastHG,
37+
UInt_t* fastLG,
38+
UInt_t* slowHG,
39+
UInt_t* slowLG,
40+
UInt_t* timeCsI,
41+
UInt_t* silHG,
42+
UInt_t* silLG,
43+
UInt_t* timeSil,
44+
UInt_t multiCsI,
45+
UInt_t multiSil)
46+
: fMulti(multi)
47+
, fNumTel(numtel)
48+
, fFastHG(fastHG)
49+
, fFastLG(fastLG)
50+
, fSlowHG(slowHG)
51+
, fSlowLG(slowLG)
52+
, fTimeCsI(timeCsI)
53+
, fSilHG(silHG)
54+
, fSilLG(silLG)
55+
, fTimeSil(timeSil)
56+
, fMultiCsI(multiCsI)
57+
, fMultiSil(multiSil)
58+
{
59+
// fMulti=multi;
60+
// LOG(info) << "R3BAsyChimeraArrayData::new entry";
61+
62+
/*
63+
fDet=new UInt_t[multi];
64+
fSide=new UInt_t[multi];
65+
fStrip=new UInt_t[multi];
66+
fRawEnergy=new UInt_t[multi];
67+
fRawTime=new UInt_t[multi];
68+
fDet=detector;
69+
fSide=side;
70+
fStrip=strip;
71+
fRawEnergy=energy;
72+
fRawTime=time;*/
6473
}
6574
UInt_t R3BAsyChimeraArrayData::GetMulti() const { return fMulti; }
6675

asydata/chimeraData/R3BAsyChimeraArrayData.h

+44-34
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,53 @@
2222
#include "TObject.h"
2323
const int dmaxx = 512;
2424

25-
class R3BAsyChimeraArrayData : public TObject {
26-
public:
27-
R3BAsyChimeraArrayData();
28-
R3BAsyChimeraArrayData(UInt_t, UInt_t *, UInt_t *, UInt_t *, UInt_t *,
29-
UInt_t *, UInt_t *, UInt_t *, UInt_t *, UInt_t *,
30-
UInt_t, UInt_t);
31-
virtual ~R3BAsyChimeraArrayData() {}
25+
class R3BAsyChimeraArrayData : public TObject
26+
{
27+
public:
28+
R3BAsyChimeraArrayData();
29+
R3BAsyChimeraArrayData(UInt_t,
30+
UInt_t*,
31+
UInt_t*,
32+
UInt_t*,
33+
UInt_t*,
34+
UInt_t*,
35+
UInt_t*,
36+
UInt_t*,
37+
UInt_t*,
38+
UInt_t*,
39+
UInt_t,
40+
UInt_t);
41+
virtual ~R3BAsyChimeraArrayData() {}
3242

33-
UInt_t GetMulti() const;
34-
UInt_t GetNumTel(int) const;
35-
UInt_t GetFastHG(int) const;
36-
UInt_t GetFastLG(int) const;
37-
UInt_t GetSlowHG(int) const;
38-
UInt_t GetSlowLG(int) const;
39-
UInt_t GetTimeCsI(int) const;
40-
UInt_t GetSilHG(int) const;
41-
UInt_t GetSilLG(int) const;
42-
UInt_t GetTimeSil(int) const;
43-
UInt_t GetMultiCsI() const;
44-
UInt_t GetMultiSil() const;
43+
UInt_t GetMulti() const;
44+
UInt_t GetNumTel(int) const;
45+
UInt_t GetFastHG(int) const;
46+
UInt_t GetFastLG(int) const;
47+
UInt_t GetSlowHG(int) const;
48+
UInt_t GetSlowLG(int) const;
49+
UInt_t GetTimeCsI(int) const;
50+
UInt_t GetSilHG(int) const;
51+
UInt_t GetSilLG(int) const;
52+
UInt_t GetTimeSil(int) const;
53+
UInt_t GetMultiCsI() const;
54+
UInt_t GetMultiSil() const;
4555

46-
private:
47-
UInt_t fMulti;
48-
UInt_t *fNumTel; //[fMulti]
49-
UInt_t *fFastHG; //[fMulti]
50-
UInt_t *fFastLG; //[fMulti]
51-
UInt_t *fSlowHG; //[fMulti]
52-
UInt_t *fSlowLG; //[fMulti]
53-
UInt_t *fTimeCsI; //[fMulti]
54-
UInt_t *fSilHG; //[fMulti]
55-
UInt_t *fSilLG; //[fMulti]
56-
UInt_t *fTimeSil; //[fMulti]
57-
UInt_t fMultiCsI;
58-
UInt_t fMultiSil;
56+
private:
57+
UInt_t fMulti;
58+
UInt_t* fNumTel; //[fMulti]
59+
UInt_t* fFastHG; //[fMulti]
60+
UInt_t* fFastLG; //[fMulti]
61+
UInt_t* fSlowHG; //[fMulti]
62+
UInt_t* fSlowLG; //[fMulti]
63+
UInt_t* fTimeCsI; //[fMulti]
64+
UInt_t* fSilHG; //[fMulti]
65+
UInt_t* fSilLG; //[fMulti]
66+
UInt_t* fTimeSil; //[fMulti]
67+
UInt_t fMultiCsI;
68+
UInt_t fMultiSil;
5969

60-
public:
61-
ClassDef(R3BAsyChimeraArrayData, 1)
70+
public:
71+
ClassDef(R3BAsyChimeraArrayData, 1)
6272
};
6373

6474
#endif

asydata/chimeraData/R3BAsyChimeraHitData.cxx

+15-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@
1515

1616
// ----- Default constructor -------------------------------------------
1717
R3BAsyChimeraHitData::R3BAsyChimeraHitData()
18-
: fDetId(0), fELoss(0.), fFast(0.), fSlow(0.), fToF(0.) {}
18+
: fDetId(0)
19+
, fELoss(0.)
20+
, fFast(0.)
21+
, fSlow(0.)
22+
, fToF(0.)
23+
{
24+
}
1925

2026
// ----- Standard constructor ------------------------------------------
21-
R3BAsyChimeraHitData::R3BAsyChimeraHitData(Int_t ndet, Double_t eloss,
22-
Double_t fast, Double_t slow,
23-
Double_t tof)
24-
: fDetId(ndet), fELoss(eloss), fFast(fast), fSlow(slow), fToF(tof) {}
27+
R3BAsyChimeraHitData::R3BAsyChimeraHitData(Int_t ndet, Double_t eloss, Double_t fast, Double_t slow, Double_t tof)
28+
: fDetId(ndet)
29+
, fELoss(eloss)
30+
, fFast(fast)
31+
, fSlow(slow)
32+
, fToF(tof)
33+
{
34+
}
2535
// -------------------------------------------------------------------------
2636

2737
ClassImp(R3BAsyChimeraHitData)

asydata/chimeraData/R3BAsyChimeraHitData.h

+37-37
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,43 @@
2020
#define R3BAsyChimeraHitData_H
2121
#include "TObject.h"
2222

23-
class R3BAsyChimeraHitData : public TObject {
24-
public:
25-
/** Default constructor **/
26-
R3BAsyChimeraHitData();
27-
28-
/** Constructor with arguments
29-
*@param fDetId Detector number
30-
*@param fEloss Energy Loss in [MeV]
31-
*@param fFast Fast CsI component in arb. units
32-
*@param fSlow Slow CsI component in arb. units
33-
*@param fToF Tof in [ns]
34-
**/
35-
R3BAsyChimeraHitData(Int_t DetId, Double_t ELoss, Double_t Fast,
36-
Double_t Slow, Double_t ToF);
37-
38-
/** Destructor **/
39-
virtual ~R3BAsyChimeraHitData() {}
40-
41-
/** Accessors **/
42-
Int_t GetDetId() const { return fDetId; }
43-
Double_t GetEloss() const { return fELoss; }
44-
Double_t GetFast() const { return fFast; }
45-
Double_t GetSlow() const { return fSlow; }
46-
Double_t GetToF() const { return fToF; }
47-
48-
/** Modifiers **/
49-
void SetDetID(Int_t ndet) { fDetId = ndet; };
50-
void SetELoss(Double_t eloss) { fELoss = eloss; };
51-
void SetFast(Double_t fast) { fFast = fast; };
52-
void SetSlow(Double_t slow) { fSlow = slow; };
53-
void SetTof(Double_t t) { fToF = t; };
54-
55-
private:
56-
Int_t fDetId;
57-
Double_t fELoss, fFast, fSlow, fToF;
58-
59-
ClassDef(R3BAsyChimeraHitData, 1)
23+
class R3BAsyChimeraHitData : public TObject
24+
{
25+
public:
26+
/** Default constructor **/
27+
R3BAsyChimeraHitData();
28+
29+
/** Constructor with arguments
30+
*@param fDetId Detector number
31+
*@param fEloss Energy Loss in [MeV]
32+
*@param fFast Fast CsI component in arb. units
33+
*@param fSlow Slow CsI component in arb. units
34+
*@param fToF Tof in [ns]
35+
**/
36+
R3BAsyChimeraHitData(Int_t DetId, Double_t ELoss, Double_t Fast, Double_t Slow, Double_t ToF);
37+
38+
/** Destructor **/
39+
virtual ~R3BAsyChimeraHitData() {}
40+
41+
/** Accessors **/
42+
Int_t GetDetId() const { return fDetId; }
43+
Double_t GetEloss() const { return fELoss; }
44+
Double_t GetFast() const { return fFast; }
45+
Double_t GetSlow() const { return fSlow; }
46+
Double_t GetToF() const { return fToF; }
47+
48+
/** Modifiers **/
49+
void SetDetID(Int_t ndet) { fDetId = ndet; };
50+
void SetELoss(Double_t eloss) { fELoss = eloss; };
51+
void SetFast(Double_t fast) { fFast = fast; };
52+
void SetSlow(Double_t slow) { fSlow = slow; };
53+
void SetTof(Double_t t) { fToF = t; };
54+
55+
private:
56+
Int_t fDetId;
57+
Double_t fELoss, fFast, fSlow, fToF;
58+
59+
ClassDef(R3BAsyChimeraHitData, 1)
6060
};
6161

6262
#endif

0 commit comments

Comments
 (0)