Skip to content

Commit

Permalink
Clang-Format
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsbuild committed May 16, 2019
1 parent f7d4407 commit 99a83f0
Show file tree
Hide file tree
Showing 233 changed files with 13,905 additions and 15,772 deletions.
30 changes: 14 additions & 16 deletions Alignment/CocoaModel/interface/ALILine.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//Id: ALILine.h
//CAT: Model
//
// Base class for entries
//
// History: v1.0
// Base class for entries
//
// History: v1.0
// Pedro Arce

#ifndef _ALILINE_HH
Expand All @@ -14,25 +14,23 @@
class ALIPlane;

class ALILine {

public:
ALILine(){ };
~ALILine(){ };
ALILine( const CLHEP::Hep3Vector& point, const CLHEP::Hep3Vector& direction );
// Next 1 line was added with 22 Mar 2001
// CLHEP::Hep3Vector ALILine( const ALILine& l2, bool notParallel = 0);
//0
CLHEP::Hep3Vector intersect( const ALILine& l2, bool notParallel = false);
CLHEP::Hep3Vector intersect( const ALIPlane& plane, bool notParallel = true);
const CLHEP::Hep3Vector& pt() const {return _point;};
const CLHEP::Hep3Vector& vec() const {return _direction;};
ALILine(){};
~ALILine(){};
ALILine(const CLHEP::Hep3Vector& point, const CLHEP::Hep3Vector& direction);
// Next 1 line was added with 22 Mar 2001
// CLHEP::Hep3Vector ALILine( const ALILine& l2, bool notParallel = 0);
//0
CLHEP::Hep3Vector intersect(const ALILine& l2, bool notParallel = false);
CLHEP::Hep3Vector intersect(const ALIPlane& plane, bool notParallel = true);
const CLHEP::Hep3Vector& pt() const { return _point; };
const CLHEP::Hep3Vector& vec() const { return _direction; };

friend std::ostream& operator << (std::ostream&, const ALILine& li);
friend std::ostream& operator<<(std::ostream&, const ALILine& li);

private:
CLHEP::Hep3Vector _point;
CLHEP::Hep3Vector _direction;

};

#endif
16 changes: 7 additions & 9 deletions Alignment/CocoaModel/interface/ALIPlane.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//CAT: Fit
//
// Base class for planes, defined by a point and the plane normal direction
//
// History: v1.0
//
// History: v1.0
// Pedro Arce

#ifndef _ALIPlane_HH
Expand All @@ -13,20 +13,18 @@
#include "Alignment/CocoaModel/interface/ALILine.h"

class ALIPlane {

public:
ALIPlane( const CLHEP::Hep3Vector& point, const CLHEP::Hep3Vector& normal );
ALIPlane(const CLHEP::Hep3Vector& point, const CLHEP::Hep3Vector& normal);
// Project a std::vector onto this plane
CLHEP::Hep3Vector project( const CLHEP::Hep3Vector& vec );
ALILine lineProject( const CLHEP::Hep3Vector& vec );
CLHEP::Hep3Vector project(const CLHEP::Hep3Vector& vec);
ALILine lineProject(const CLHEP::Hep3Vector& vec);
// CLHEP::Hep3Vector ALIPlane::intersect( const ALIPlane& l2);
const CLHEP::Hep3Vector& point() const {return _point;};
const CLHEP::Hep3Vector& normal() const {return _normal;};
const CLHEP::Hep3Vector& point() const { return _point; };
const CLHEP::Hep3Vector& normal() const { return _normal; };

private:
CLHEP::Hep3Vector _point;
CLHEP::Hep3Vector _normal;

};

#endif
19 changes: 9 additions & 10 deletions Alignment/CocoaModel/interface/ALIRmDataFromFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//CAT: Model
//
// Base class for entry data
//
//
// History: Creation 26/06/2005
// Pedro Arce

Expand All @@ -12,18 +12,17 @@
#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include "CLHEP/Vector/Rotation.h"

class ALIRmDataFromFile
{
class ALIRmDataFromFile {
public:
//----- Constructor / destructor
//----- Constructor / destructor
ALIRmDataFromFile();
~ALIRmDataFromFile(){};

// Access DATA MEMBERS
ALIbool setAngle( const ALIstring& coord, const ALIdouble val );
ALIbool setAngleX( const ALIdouble val );
ALIbool setAngleY( const ALIdouble val );
ALIbool setAngleZ( const ALIdouble val );
// Access DATA MEMBERS
ALIbool setAngle(const ALIstring& coord, const ALIdouble val);
ALIbool setAngleX(const ALIdouble val);
ALIbool setAngleY(const ALIdouble val);
ALIbool setAngleZ(const ALIdouble val);
void constructRm();

ALIdouble angleX() const { return theAngleX; }
Expand All @@ -32,7 +31,7 @@ class ALIRmDataFromFile
CLHEP::HepRotation rm() const { return theRm; }
ALIstring dataFilled() const { return theDataFilled; }

// private DATA MEMBERS
// private DATA MEMBERS
private:
CLHEP::HepRotation theRm;
ALIdouble theAngleX, theAngleY, theAngleZ;
Expand Down
137 changes: 61 additions & 76 deletions Alignment/CocoaModel/interface/ALIUnitsTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,124 +47,109 @@
class ALIUnitsCategory;
typedef std::vector<ALIUnitsCategory*> ALIUnitsTable;


//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

class ALIUnitDefinition : public std::enable_shared_from_this<ALIUnitDefinition>
{
class ALIUnitDefinition : public std::enable_shared_from_this<ALIUnitDefinition> {
public: // with description

ALIUnitDefinition(ALIstring name, ALIstring symbol,
ALIstring category, ALIdouble value);
ALIUnitDefinition(ALIstring name, ALIstring symbol, ALIstring category, ALIdouble value);

public: // without description

~ALIUnitDefinition();
ALIint operator==(const ALIUnitDefinition&) const;
ALIint operator!=(const ALIUnitDefinition&) const;
~ALIUnitDefinition();
ALIint operator==(const ALIUnitDefinition&) const;
ALIint operator!=(const ALIUnitDefinition&) const;

private:

ALIUnitDefinition(ALIUnitDefinition&);
ALIUnitDefinition& operator=(const ALIUnitDefinition&);
ALIUnitDefinition(ALIUnitDefinition&);
ALIUnitDefinition& operator=(const ALIUnitDefinition&);

public: // with description
ALIstring GetName() const { return Name; }
ALIstring GetSymbol() const { return SymbolName; }
ALIdouble GetValue() const { return Value; }

ALIstring GetName() const {return Name;}
ALIstring GetSymbol() const {return SymbolName;}
ALIdouble GetValue() const {return Value;}
void PrintDefinition();

void PrintDefinition();
static void BuildUnitsTable();
static void PrintUnitsTable();

static void BuildUnitsTable();
static void PrintUnitsTable();
static ALIUnitsTable& GetUnitsTable() { return theUnitsTable; }

static ALIUnitsTable& GetUnitsTable() {return theUnitsTable;}

static ALIdouble GetValueOf (ALIstring);
static ALIstring GetCategory(ALIstring);
static ALIdouble GetValueOf(ALIstring);
static ALIstring GetCategory(ALIstring);

private:
ALIstring Name; // SI name
ALIstring SymbolName; // SI symbol
ALIdouble Value; // value in the internal system of units

ALIstring Name; // SI name
ALIstring SymbolName; // SI symbol
ALIdouble Value; // value in the internal system of units

static
ALIUnitsTable theUnitsTable; // table of Units
static ALIUnitsTable theUnitsTable; // table of Units


size_t CategoryIndex; // category index of this unit
size_t CategoryIndex; // category index of this unit
};

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

using ALIUnitsContainer = std::vector<std::shared_ptr<ALIUnitDefinition>>;

class ALIUnitsCategory
{
class ALIUnitsCategory {
public: // without description

ALIUnitsCategory(ALIstring name);
~ALIUnitsCategory();
ALIint operator==(const ALIUnitsCategory&) const;
ALIint operator!=(const ALIUnitsCategory&) const;
ALIUnitsCategory(ALIstring name);
~ALIUnitsCategory();
ALIint operator==(const ALIUnitsCategory&) const;
ALIint operator!=(const ALIUnitsCategory&) const;

private:

ALIUnitsCategory(ALIUnitsCategory&);
ALIUnitsCategory& operator=(const ALIUnitsCategory&);
ALIUnitsCategory(ALIUnitsCategory&);
ALIUnitsCategory& operator=(const ALIUnitsCategory&);

public: // without description

ALIstring GetName() const {return Name;}
ALIUnitsContainer& GetUnitsList() {return UnitsList;}
ALIint GetNameMxLen() const {return NameMxLen;}
ALIint GetSymbMxLen() const {return SymbMxLen;}
void UpdateNameMxLen(ALIint len) {if (NameMxLen<len) NameMxLen=len;}
void UpdateSymbMxLen(ALIint len) {if (SymbMxLen<len) SymbMxLen=len;}
void PrintCategory();
ALIstring GetName() const { return Name; }
ALIUnitsContainer& GetUnitsList() { return UnitsList; }
ALIint GetNameMxLen() const { return NameMxLen; }
ALIint GetSymbMxLen() const { return SymbMxLen; }
void UpdateNameMxLen(ALIint len) {
if (NameMxLen < len)
NameMxLen = len;
}
void UpdateSymbMxLen(ALIint len) {
if (SymbMxLen < len)
SymbMxLen = len;
}
void PrintCategory();

private:

ALIstring Name; // dimensional family: Length,Volume,Energy ...
ALIUnitsContainer UnitsList; // List of units in this family
ALIint NameMxLen; // max length of the units name
ALIint SymbMxLen; // max length of the units symbol
ALIstring Name; // dimensional family: Length,Volume,Energy ...
ALIUnitsContainer UnitsList; // List of units in this family
ALIint NameMxLen; // max length of the units name
ALIint SymbMxLen; // max length of the units symbol
};

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

class ALIBestUnit
{
class ALIBestUnit {
public: // with description
ALIBestUnit(ALIdouble internalValue, ALIstring category);
ALIBestUnit(const CLHEP::Hep3Vector& internalValue, ALIstring category);
// These constructors convert a physical quantity from its internalValue
// into the most appropriate unit of the same category.
// In practice it builds an object VU = (newValue, newUnit)

ALIBestUnit(ALIdouble internalValue, ALIstring category);
ALIBestUnit(const CLHEP::Hep3Vector& internalValue, ALIstring category);
// These constructors convert a physical quantity from its internalValue
// into the most appropriate unit of the same category.
// In practice it builds an object VU = (newValue, newUnit)

~ALIBestUnit();
~ALIBestUnit();

public: // without description

ALIdouble* GetValue() {return Value;}
ALIstring GetCategory() const {return Category;}
size_t GetIndexOfCategory() const {return IndexOfCategory;}
ALIdouble* GetValue() { return Value; }
ALIstring GetCategory() const { return Category; }
size_t GetIndexOfCategory() const { return IndexOfCategory; }

public: // with description

friend
std::ostream& operator<<(std::ostream&,ALIBestUnit VU);
// Default format to print the objet VU above.
friend std::ostream& operator<<(std::ostream&, ALIBestUnit VU);
// Default format to print the objet VU above.

private:

ALIdouble Value[3]; // value in the internal system of units
ALIint nbOfVals; // ALIdouble=1; CLHEP::Hep3Vector=3
ALIstring Category; // dimensional family: Length,Volume,Energy ...
size_t IndexOfCategory; // position of Category in UnitsTable
ALIdouble Value[3]; // value in the internal system of units
ALIint nbOfVals; // ALIdouble=1; CLHEP::Hep3Vector=3
ALIstring Category; // dimensional family: Length,Volume,Energy ...
size_t IndexOfCategory; // position of Category in UnitsTable
};

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Expand Down
33 changes: 17 additions & 16 deletions Alignment/CocoaModel/interface/CocoaDaqReaderRoot.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,28 @@ class AliDaqDistance;
class OpticalAlignMeasurementInfo;

class CocoaDaqReaderRoot : public CocoaDaqReader {
public:
CocoaDaqReaderRoot(const std::string& m_inFileName );
public:
CocoaDaqReaderRoot(const std::string& m_inFileName);
~CocoaDaqReaderRoot() override;
bool ReadNextEvent() override;
bool ReadEvent( int nev ) override;
void BuildMeasurementsFromOptAlign( std::vector<OpticalAlignMeasurementInfo>& measList ) override;
bool ReadEvent(int nev) override;
void BuildMeasurementsFromOptAlign(std::vector<OpticalAlignMeasurementInfo>& measList) override;

public:
public:
int GetNEvents() const { return nev; }
private:
OpticalAlignMeasurementInfo GetMeasFromPosition2D( AliDaqPosition2D* pos2D );
OpticalAlignMeasurementInfo GetMeasFromPositionCOPS( AliDaqPositionCOPS* posCOPS );
OpticalAlignMeasurementInfo GetMeasFromTilt( AliDaqTilt* tilt );
OpticalAlignMeasurementInfo GetMeasFromDist( AliDaqDistance* dist );

private:
CocoaDaqRootEvent *theEvent;
TFile* theFile;
TTree* theTree;
int nev;
int nextEvent;
private:
OpticalAlignMeasurementInfo GetMeasFromPosition2D(AliDaqPosition2D* pos2D);
OpticalAlignMeasurementInfo GetMeasFromPositionCOPS(AliDaqPositionCOPS* posCOPS);
OpticalAlignMeasurementInfo GetMeasFromTilt(AliDaqTilt* tilt);
OpticalAlignMeasurementInfo GetMeasFromDist(AliDaqDistance* dist);

private:
CocoaDaqRootEvent* theEvent;
TFile* theFile;
TTree* theTree;
int nev;
int nextEvent;
};

#endif
14 changes: 6 additions & 8 deletions Alignment/CocoaModel/interface/CocoaDaqReaderText.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@
#include "Alignment/CocoaUtilities/interface/ALIFileIn.h"
class OpticalAlignMeasurementInfo;


class CocoaDaqReaderText : public CocoaDaqReader
{
public:
CocoaDaqReaderText(const std::string& fileName );
class CocoaDaqReaderText : public CocoaDaqReader {
public:
CocoaDaqReaderText(const std::string& fileName);
~CocoaDaqReaderText() override;

bool ReadNextEvent() override;
void BuildMeasurementsFromOptAlign( std::vector<OpticalAlignMeasurementInfo>& measList ) override;
void BuildMeasurementsFromOptAlign(std::vector<OpticalAlignMeasurementInfo>& measList) override;

public:
public:
int GetNEvents() const { return nev; }

protected:
protected:
int nev;
int nextEvent;
ALIFileIn theFilein;
Expand Down
Loading

0 comments on commit 99a83f0

Please sign in to comment.