CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 7 of file LASGlobalLoop.cc.

7 {}

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 74 of file LASGlobalLoop.cc.

References EcalCondDBWriter_cfi::beam, and EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::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().

74  {
75  if (subdet > 1) {
76  std::cerr << " [LASGlobalLoop::TEC2TECLoop] ** ERROR: TEC loop running on TIB/TOB (subdetector > 1)" << std::endl;
77  throw 1;
78  }
79 
80  ++disk;
81 
82  if (disk == 5) {
83  ++beam;
84  disk = 0;
85 
86  if (beam == 8) {
87  ++subdet;
88  beam = 0;
89 
90  if (subdet == 2)
91  return false;
92  }
93  }
94 
95  return true;
96 }
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 13 of file LASGlobalLoop.cc.

References EcalCondDBWriter_cfi::beam, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::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().

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

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

Definition at line 46 of file LASGlobalLoop.cc.

References EcalCondDBWriter_cfi::beam, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::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().

46  {
47  if (subdet < 2) {
48  std::cerr << " [LASGlobalLoop::TIBTOBLoop] ** ERROR: Barrel loop running on TEC (subdetector < 2)" << std::endl;
49  throw 1;
50  }
51 
52  ++position;
53 
54  if (position == 6) {
55  ++beam;
56  position = 0;
57 
58  if (beam == 8) {
59  ++subdet;
60  beam = 0;
61 
62  if (subdet == 4)
63  return false;
64  }
65  }
66 
67  return true;
68 }
static int position[264][3]
Definition: ReadPGInfo.cc:289