CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
LASGlobalLoop Class Reference

#include <LASGlobalLoop.h>

Public Member Functions

 LASGlobalLoop ()
 
bool TEC2TECLoop (int &, int &, int &) const
 
bool TECLoop (int &, int &, int &, int &) const
 
bool TIBTOBLoop (int &, int &, int &) const
 

Detailed Description

helper class for looping over LASGlobalData objects (si-strip module loops). Use exactly as:

* LASGlobalLoop theLoop;
* int det = 0, ring = 0, beam = 0, disk = 0;
* do {
* // det,ring,beam,disk will loop the full TEC+,TEC-
* } while ( loop.TECLoop( det, ring, beam, disk ) );
* int pos = 0;
* det = 2; // set subdetector to TIB
* beam = 0;
* do {
* // dto.
* } while( loop.TIBTOBLoop( det, beam, disk ) );
*

Definition at line 24 of file LASGlobalLoop.h.

Constructor & Destructor Documentation

LASGlobalLoop::LASGlobalLoop ( )

Definition at line 8 of file LASGlobalLoop.cc.

8  {
9 }

Member Function Documentation

bool LASGlobalLoop::TEC2TECLoop ( int &  subdet,
int &  beam,
int &  disk 
) const

full TEC AT loop with starting values given by parameter values

Definition at line 92 of file LASGlobalLoop.cc.

References EcalCondDBWriter_cfi::beam, and dtNoiseDBValidation_cfg::cerr.

Referenced by LaserAlignment::ApplyATMaskingCorrections(), LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LASAlignmentTubeAlgorithm::CalculateParameters(), RawDataConverter::ClearData(), LaserAlignment::DumpPosFileSet(), LaserAlignment::DumpStripFileSet(), LASGeometryUpdater::EndcapUpdate(), LaserAlignment::endRunProduce(), fcn(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), RawDataConverter::GetDigis(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

92  {
93 
94  if( subdet > 1 ) {
95  std::cerr << " [LASGlobalLoop::TEC2TECLoop] ** ERROR: TEC loop running on TIB/TOB (subdetector > 1)" << std::endl;
96  throw 1;
97  }
98 
99  ++disk;
100 
101  if( disk == 5 ) {
102  ++beam;
103  disk = 0;
104 
105  if( beam == 8 ) {
106  ++subdet;
107  beam = 0;
108 
109  if( subdet == 2 ) return false;
110 
111  }
112  }
113 
114  return true;
115 
116 }
bool LASGlobalLoop::TECLoop ( int &  subdet,
int &  ring,
int &  beam,
int &  disk 
) const

full TEC loop (both endcaps) with starting values given by parameter values

Definition at line 19 of file LASGlobalLoop.cc.

References EcalCondDBWriter_cfi::beam, dtNoiseDBValidation_cfg::cerr, and relativeConstraints::ring.

Referenced by LaserAlignment::ApplyEndcapMaskingCorrections(), LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LASEndcapAlgorithm::CalculateParameters(), RawDataConverter::ClearData(), LaserAlignment::DumpPosFileSet(), LaserAlignment::DumpStripFileSet(), LaserAlignment::endRunProduce(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), RawDataConverter::GetDigis(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

19  {
20 
21  if( subdet > 1 ) {
22  std::cerr << " [LASGlobalLoop::TECLoop] ** ERROR: Endcap loop running on TIB/TOB (subdetector > 1)" << std::endl;
23  throw 1;
24  }
25 
26  ++disk;
27 
28  if( disk == 9 ) {
29  ++beam;
30  disk = 0;
31 
32  if( beam == 8 ) {
33  ++ring;
34  beam = 0;
35 
36  if( ring == 2 ) {
37  ++subdet;
38  ring = 0;
39 
40  if( subdet == 2 ) return false;
41 
42  }
43  }
44  }
45 
46  return true;
47 
48 }
bool LASGlobalLoop::TIBTOBLoop ( int &  subdet,
int &  beam,
int &  position 
) const

full TIB+TOB loop with starting values given by parameter values

Definition at line 58 of file LASGlobalLoop.cc.

References EcalCondDBWriter_cfi::beam, dtNoiseDBValidation_cfg::cerr, and position.

Referenced by LaserAlignment::ApplyATMaskingCorrections(), LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LASAlignmentTubeAlgorithm::CalculateParameters(), RawDataConverter::ClearData(), LaserAlignment::DumpPosFileSet(), LaserAlignment::DumpStripFileSet(), LaserAlignment::endRunProduce(), fcn(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), RawDataConverter::GetDigis(), LaserAlignment::isATBeam(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

58  {
59 
60  if( subdet < 2 ) {
61  std::cerr << " [LASGlobalLoop::TIBTOBLoop] ** ERROR: Barrel loop running on TEC (subdetector < 2)" << std::endl;
62  throw 1;
63  }
64 
65  ++position;
66 
67  if( position == 6 ) {
68  ++beam;
69  position = 0;
70 
71  if( beam == 8 ) {
72  ++subdet;
73  beam = 0;
74 
75  if( subdet == 4 ) return false;
76 
77  }
78  }
79 
80  return true;
81 
82 }
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509