CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 22 of file DiscretePFInputsIO.h.

References l1tpf_impl::CaloCluster::hwEmPt, l1tpf_impl::CaloCluster::hwEta, l1tpf_impl::CaloCluster::hwFlags, l1tpf_impl::CaloCluster::hwPhi, l1tpf_impl::CaloCluster::hwPt, l1tpf_impl::CaloCluster::hwPtErr, l1tpf_impl::CaloCluster::isEM, l1tpf_impl::CaloCluster::src, and l1tpf_impl::CaloCluster::used.

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  }
const edm::EventSetup & c
void l1tpf_impl::readFromFile ( InputTrack &  t,
FILE *  file 
)
inline

Definition at line 45 of file DiscretePFInputsIO.h.

References l1tpf_impl::InputTrack::hwCharge, l1tpf_impl::InputTrack::hwChi2, l1tpf_impl::InputTrack::hwFlags, l1tpf_impl::InputTrack::hwInvpt, l1tpf_impl::InputTrack::hwStubs, l1tpf_impl::InputTrack::hwVtxEta, l1tpf_impl::InputTrack::hwVtxPhi, l1tpf_impl::InputTrack::hwZ0, and l1tpf_impl::InputTrack::src.

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  }
void l1tpf_impl::readFromFile ( PropagatedTrack &  t,
FILE *  file 
)
inline

Definition at line 65 of file DiscretePFInputsIO.h.

References l1tpf_impl::PropagatedTrack::fromPV, l1tpf_impl::PropagatedTrack::hwCaloPtErr, l1tpf_impl::PropagatedTrack::hwEta, l1tpf_impl::PropagatedTrack::hwPhi, l1tpf_impl::PropagatedTrack::hwPt, l1tpf_impl::PropagatedTrack::hwPtErr, l1tpf_impl::PropagatedTrack::muonLink, readFromFile(), and l1tpf_impl::PropagatedTrack::used.

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(CaloCluster &c, FILE *file)
void l1tpf_impl::readFromFile ( Muon &  m,
FILE *  file 
)
inline

Definition at line 84 of file DiscretePFInputsIO.h.

References l1tpf_impl::Muon::hwCharge, l1tpf_impl::Muon::hwEta, l1tpf_impl::Muon::hwFlags, l1tpf_impl::Muon::hwPhi, l1tpf_impl::Muon::hwPt, and l1tpf_impl::Muon::src.

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  }
void l1tpf_impl::readFromFile ( float &  pug,
FILE *  file 
)
inline

Definition at line 94 of file DiscretePFInputsIO.h.

94 { fread(&pug, sizeof(float), 1, file); }
void l1tpf_impl::readFromFile ( InputRegion &  r,
FILE *  file 
)
inline

Definition at line 127 of file DiscretePFInputsIO.h.

References cms::cuda::assert(), l1tpf_impl::InputRegion::calo, l1tpf_impl::InputRegion::emcalo, l1tpf_impl::InputRegion::etaCenter, l1tpf_impl::InputRegion::etaExtra, l1tpf_impl::InputRegion::etaMax, l1tpf_impl::InputRegion::etaMin, l1tpf_impl::InputRegion::muon, l1tpf_impl::InputRegion::phiCenter, l1tpf_impl::InputRegion::phiExtra, l1tpf_impl::InputRegion::phiHalfWidth, readManyFromFile(), and l1tpf_impl::InputRegion::track.

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)
template<typename T >
void l1tpf_impl::readManyFromFile ( std::vector< T > &  objs,
FILE *  file 
)

Definition at line 105 of file DiscretePFInputsIO.h.

References mps_fire::i, contentValuesFiles::number, 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(CaloCluster &c, FILE *file)
template<typename T >
void l1tpf_impl::writeManyToFile ( const std::vector< T > &  objs,
FILE *  file 
)

Definition at line 97 of file DiscretePFInputsIO.h.

References mps_fire::i, contentValuesFiles::number, 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 CaloCluster &c, FILE *file)
void l1tpf_impl::writeToFile ( const CaloCluster &  c,
FILE *  file 
)
inline

Definition at line 11 of file DiscretePFInputsIO.h.

References l1tpf_impl::CaloCluster::hwEmPt, l1tpf_impl::CaloCluster::hwEta, l1tpf_impl::CaloCluster::hwFlags, l1tpf_impl::CaloCluster::hwPhi, l1tpf_impl::CaloCluster::hwPt, l1tpf_impl::CaloCluster::hwPtErr, and l1tpf_impl::CaloCluster::isEM.

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  }
const edm::EventSetup & c
void l1tpf_impl::writeToFile ( const InputTrack &  t,
FILE *  file 
)
inline

Definition at line 34 of file DiscretePFInputsIO.h.

References l1tpf_impl::InputTrack::hwCharge, l1tpf_impl::InputTrack::hwChi2, l1tpf_impl::InputTrack::hwFlags, l1tpf_impl::InputTrack::hwInvpt, l1tpf_impl::InputTrack::hwStubs, l1tpf_impl::InputTrack::hwVtxEta, l1tpf_impl::InputTrack::hwVtxPhi, and l1tpf_impl::InputTrack::hwZ0.

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  }
void l1tpf_impl::writeToFile ( const PropagatedTrack &  t,
FILE *  file 
)
inline

Definition at line 56 of file DiscretePFInputsIO.h.

References l1tpf_impl::PropagatedTrack::hwCaloPtErr, l1tpf_impl::PropagatedTrack::hwEta, l1tpf_impl::PropagatedTrack::hwPhi, l1tpf_impl::PropagatedTrack::hwPt, l1tpf_impl::PropagatedTrack::hwPtErr, 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 CaloCluster &c, FILE *file)
void l1tpf_impl::writeToFile ( const Muon &  m,
FILE *  file 
)
inline

Definition at line 77 of file DiscretePFInputsIO.h.

References l1tpf_impl::Muon::hwCharge, l1tpf_impl::Muon::hwEta, l1tpf_impl::Muon::hwFlags, l1tpf_impl::Muon::hwPhi, and l1tpf_impl::Muon::hwPt.

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  }
void l1tpf_impl::writeToFile ( const float &  pug,
FILE *  file 
)
inline

Definition at line 93 of file DiscretePFInputsIO.h.

93 { fwrite(&pug, sizeof(float), 1, file); }
void l1tpf_impl::writeToFile ( const InputRegion &  r,
FILE *  file 
)
inline

Definition at line 113 of file DiscretePFInputsIO.h.

References cms::cuda::assert(), l1tpf_impl::InputRegion::calo, l1tpf_impl::InputRegion::emcalo, l1tpf_impl::InputRegion::etaCenter, l1tpf_impl::InputRegion::etaExtra, l1tpf_impl::InputRegion::etaMax, l1tpf_impl::InputRegion::etaMin, l1tpf_impl::InputRegion::muon, l1tpf_impl::InputRegion::phiCenter, l1tpf_impl::InputRegion::phiExtra, l1tpf_impl::InputRegion::phiHalfWidth, l1tpf_impl::InputRegion::track, 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)