CMS 3D CMS Logo

Classes | Functions
l1tpf_impl Namespace Reference

Classes

class  BitwisePFAlgo
 
struct  CaloCluster
 
class  COEFile
 
struct  InputRegion
 
struct  InputTrack
 
class  LinearizedPuppiAlgo
 
struct  Muon
 
class  PFAlgo2HGC
 
class  PFAlgo3
 
class  PFAlgoBase
 
struct  PFParticle
 
struct  PropagatedTrack
 
class  PUAlgoBase
 
class  PuppiAlgo
 
struct  Region
 
class  RegionMapper
 

Functions

void readFromFile (CaloCluster &c, FILE *file)
 
void readFromFile (InputTrack &t, FILE *file)
 
void readFromFile (PropagatedTrack &t, FILE *file)
 
void readFromFile (Muon &m, FILE *file)
 
void readFromFile (float &pug, FILE *file)
 
void readFromFile (InputRegion &r, FILE *file)
 
template<typename T >
void readManyFromFile (std::vector< T > &objs, FILE *file)
 
template<typename T >
void writeManyToFile (const std::vector< T > &objs, FILE *file)
 
void writeToFile (const CaloCluster &c, FILE *file)
 
void writeToFile (const InputTrack &t, FILE *file)
 
void writeToFile (const PropagatedTrack &t, FILE *file)
 
void writeToFile (const Muon &m, FILE *file)
 
void writeToFile (const float &pug, FILE *file)
 
void writeToFile (const InputRegion &r, FILE *file)
 

Function Documentation

◆ readFromFile() [1/6]

void l1tpf_impl::readFromFile ( CaloCluster c,
FILE *  file 
)
inline

Definition at line 22 of file DiscretePFInputsIO.h.

References c, and geometryDiff::file.

Referenced by popcon::EcalTPGBadStripHandler::getNewObjects(), popcon::EcalTPGBadTTHandler::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGTPModeHandler::getNewObjects(), popcon::EcalTPGWeightIdMapHandler::getNewObjects(), popcon::EcalTPGFineGrainEBIdMapHandler::getNewObjects(), popcon::EcalTPGLutIdMapHandler::getNewObjects(), popcon::EcalTPGOddWeightIdMapHandler::getNewObjects(), popcon::EcalTPGPhysicsConstHandler::getNewObjects(), popcon::EcalTPGBadXTHandler::getNewObjects(), popcon::EcalTPGFineGrainEBGroupHandler::getNewObjects(), popcon::EcalTPGFineGrainTowerEEHandler::getNewObjects(), popcon::EcalTPGWeightGroupHandler::getNewObjects(), popcon::EcalTPGOddWeightGroupHandler::getNewObjects(), popcon::EcalTPGSlidingWindowHandler::getNewObjects(), popcon::EcalTPGFineGrainStripEEHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalTPGLutGroupHandler::getNewObjects(), popcon::EcalTPGSpikeThresholdHandler::getNewObjects(), readFromFile(), and readManyFromFile().

22  {
23  fread(&c.hwPt, 2, 1, file);
24  fread(&c.hwEmPt, 2, 1, file);
25  fread(&c.hwPtErr, 2, 1, file);
26  fread(&c.hwEta, 2, 1, file);
27  fread(&c.hwPhi, 2, 1, file);
28  fread(&c.hwFlags, 2, 1, file);
29  fread(&c.isEM, 1, 1, file);
30  c.used = false;
31  c.src = nullptr;
32  }

◆ readFromFile() [2/6]

void l1tpf_impl::readFromFile ( InputTrack t,
FILE *  file 
)
inline

Definition at line 45 of file DiscretePFInputsIO.h.

References geometryDiff::file, and submitPVValidationJobs::t.

45  {
46  fread(&t.hwInvpt, 2, 1, file);
47  fread(&t.hwVtxEta, 4, 1, file);
48  fread(&t.hwVtxPhi, 4, 1, file);
49  fread(&t.hwCharge, 1, 1, file);
50  fread(&t.hwZ0, 2, 1, file);
51  fread(&t.hwChi2, 2, 1, file);
52  fread(&t.hwStubs, 2, 1, file);
53  fread(&t.hwFlags, 2, 1, file);
54  t.src = nullptr;
55  }

◆ readFromFile() [3/6]

void l1tpf_impl::readFromFile ( PropagatedTrack t,
FILE *  file 
)
inline

Definition at line 65 of file DiscretePFInputsIO.h.

References geometryDiff::file, readFromFile(), and submitPVValidationJobs::t.

65  {
66  readFromFile(static_cast<InputTrack &>(t), file);
67  fread(&t.hwPt, 2, 1, file);
68  fread(&t.hwPtErr, 2, 1, file);
69  fread(&t.hwCaloPtErr, 2, 1, file);
70  fread(&t.hwEta, 2, 1, file);
71  fread(&t.hwPhi, 2, 1, file);
72  t.muonLink = false;
73  t.used = false;
74  t.fromPV = false;
75  }
void readFromFile(InputRegion &r, FILE *file)

◆ readFromFile() [4/6]

void l1tpf_impl::readFromFile ( Muon m,
FILE *  file 
)
inline

Definition at line 84 of file DiscretePFInputsIO.h.

References geometryDiff::file, and visualization-live-secondInstance_cfg::m.

84  {
85  fread(&m.hwPt, 2, 1, file);
86  fread(&m.hwEta, 2, 1, file);
87  fread(&m.hwPhi, 2, 1, file);
88  fread(&m.hwFlags, 2, 1, file);
89  fread(&m.hwCharge, 1, 1, file);
90  m.src = nullptr;
91  }

◆ readFromFile() [5/6]

void l1tpf_impl::readFromFile ( float &  pug,
FILE *  file 
)
inline

Definition at line 94 of file DiscretePFInputsIO.h.

References geometryDiff::file.

94 { fread(&pug, sizeof(float), 1, file); }

◆ readFromFile() [6/6]

void l1tpf_impl::readFromFile ( InputRegion r,
FILE *  file 
)
inline

Definition at line 127 of file DiscretePFInputsIO.h.

References cms::cuda::assert(), geometryDiff::file, alignCSCRings::r, and readManyFromFile().

127  {
128  assert(4 == sizeof(float));
129  fread(&r.etaCenter, 4, 1, file);
130  fread(&r.etaMin, 4, 1, file);
131  fread(&r.etaMax, 4, 1, file);
132  fread(&r.phiCenter, 4, 1, file);
133  fread(&r.phiHalfWidth, 4, 1, file);
134  fread(&r.etaExtra, 4, 1, file);
135  fread(&r.phiExtra, 4, 1, file);
136  readManyFromFile(r.calo, file);
137  readManyFromFile(r.emcalo, file);
138  readManyFromFile(r.track, file);
139  readManyFromFile(r.muon, file);
140  }
void readManyFromFile(std::vector< T > &objs, FILE *file)
assert(be >=bs)

◆ readManyFromFile()

template<typename T >
void l1tpf_impl::readManyFromFile ( std::vector< T > &  objs,
FILE *  file 
)

Definition at line 105 of file DiscretePFInputsIO.h.

References geometryDiff::file, mps_fire::i, contentValuesFiles::number, HLTEGTnPMonitor_cfi::objs, and readFromFile().

Referenced by readFromFile().

105  {
106  uint32_t number;
107  fread(&number, 4, 1, file);
108  objs.resize(number);
109  for (uint32_t i = 0; i < number; ++i)
110  readFromFile(objs[i], file);
111  }
void readFromFile(InputRegion &r, FILE *file)

◆ writeManyToFile()

template<typename T >
void l1tpf_impl::writeManyToFile ( const std::vector< T > &  objs,
FILE *  file 
)

Definition at line 97 of file DiscretePFInputsIO.h.

References geometryDiff::file, mps_fire::i, contentValuesFiles::number, HLTEGTnPMonitor_cfi::objs, and writeToFile().

Referenced by L1TPFProducer::produce(), and writeToFile().

97  {
98  uint32_t number = objs.size();
99  fwrite(&number, 4, 1, file);
100  for (uint32_t i = 0; i < number; ++i)
101  writeToFile(objs[i], file);
102  }
void writeToFile(const InputRegion &r, FILE *file)

◆ writeToFile() [1/6]

void l1tpf_impl::writeToFile ( const CaloCluster c,
FILE *  file 
)
inline

Definition at line 11 of file DiscretePFInputsIO.h.

References c, and geometryDiff::file.

Referenced by Vx3DHLTAnalyzer::dqmEndLuminosityBlock(), writeManyToFile(), l1tpf::corrector::writeToFile(), and writeToFile().

11  {
12  fwrite(&c.hwPt, 2, 1, file);
13  fwrite(&c.hwEmPt, 2, 1, file);
14  fwrite(&c.hwPtErr, 2, 1, file);
15  fwrite(&c.hwEta, 2, 1, file);
16  fwrite(&c.hwPhi, 2, 1, file);
17  fwrite(&c.hwFlags, 2, 1, file);
18  fwrite(&c.isEM, 1, 1, file);
19  // used is not written out
20  // src is not written out
21  }

◆ writeToFile() [2/6]

void l1tpf_impl::writeToFile ( const InputTrack t,
FILE *  file 
)
inline

Definition at line 34 of file DiscretePFInputsIO.h.

References geometryDiff::file, and submitPVValidationJobs::t.

34  {
35  fwrite(&t.hwInvpt, 2, 1, file);
36  fwrite(&t.hwVtxEta, 4, 1, file);
37  fwrite(&t.hwVtxPhi, 4, 1, file);
38  fwrite(&t.hwCharge, 1, 1, file);
39  fwrite(&t.hwZ0, 2, 1, file);
40  fwrite(&t.hwChi2, 2, 1, file);
41  fwrite(&t.hwStubs, 2, 1, file);
42  fwrite(&t.hwFlags, 2, 1, file);
43  // src is not written out
44  }

◆ writeToFile() [3/6]

void l1tpf_impl::writeToFile ( const PropagatedTrack t,
FILE *  file 
)
inline

Definition at line 56 of file DiscretePFInputsIO.h.

References geometryDiff::file, submitPVValidationJobs::t, and writeToFile().

56  {
57  writeToFile(static_cast<const InputTrack &>(t), file);
58  fwrite(&t.hwPt, 2, 1, file);
59  fwrite(&t.hwPtErr, 2, 1, file);
60  fwrite(&t.hwCaloPtErr, 2, 1, file);
61  fwrite(&t.hwEta, 2, 1, file);
62  fwrite(&t.hwPhi, 2, 1, file);
63  // muonLink, used, fromPV are transient
64  }
void writeToFile(const InputRegion &r, FILE *file)

◆ writeToFile() [4/6]

void l1tpf_impl::writeToFile ( const Muon m,
FILE *  file 
)
inline

Definition at line 77 of file DiscretePFInputsIO.h.

References geometryDiff::file, and visualization-live-secondInstance_cfg::m.

77  {
78  fwrite(&m.hwPt, 2, 1, file);
79  fwrite(&m.hwEta, 2, 1, file);
80  fwrite(&m.hwPhi, 2, 1, file);
81  fwrite(&m.hwFlags, 2, 1, file);
82  fwrite(&m.hwCharge, 1, 1, file);
83  }

◆ writeToFile() [5/6]

void l1tpf_impl::writeToFile ( const float &  pug,
FILE *  file 
)
inline

Definition at line 93 of file DiscretePFInputsIO.h.

References geometryDiff::file.

93 { fwrite(&pug, sizeof(float), 1, file); }

◆ writeToFile() [6/6]

void l1tpf_impl::writeToFile ( const InputRegion r,
FILE *  file 
)
inline

Definition at line 113 of file DiscretePFInputsIO.h.

References cms::cuda::assert(), geometryDiff::file, alignCSCRings::r, and writeManyToFile().

113  {
114  assert(4 == sizeof(float));
115  fwrite(&r.etaCenter, 4, 1, file);
116  fwrite(&r.etaMin, 4, 1, file);
117  fwrite(&r.etaMax, 4, 1, file);
118  fwrite(&r.phiCenter, 4, 1, file);
119  fwrite(&r.phiHalfWidth, 4, 1, file);
120  fwrite(&r.etaExtra, 4, 1, file);
121  fwrite(&r.phiExtra, 4, 1, file);
122  writeManyToFile(r.calo, file);
123  writeManyToFile(r.emcalo, file);
124  writeManyToFile(r.track, file);
125  writeManyToFile(r.muon, file);
126  }
void writeManyToFile(const std::vector< T > &objs, FILE *file)
assert(be >=bs)