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 (float &pug, FILE *file)
 
void readFromFile (InputRegion &r, FILE *file)
 
void readFromFile (InputTrack &t, FILE *file)
 
void readFromFile (Muon &m, FILE *file)
 
void readFromFile (PropagatedTrack &t, 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 float &pug, FILE *file)
 
void writeToFile (const InputRegion &r, FILE *file)
 
void writeToFile (const InputTrack &t, FILE *file)
 
void writeToFile (const Muon &m, FILE *file)
 
void writeToFile (const PropagatedTrack &t, FILE *file)
 

Function Documentation

◆ readFromFile() [1/6]

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

◆ readFromFile() [2/6]

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

Definition at line 94 of file DiscretePFInputsIO.h.

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

References FrontierConditions_GlobalTag_cff::file.

◆ readFromFile() [3/6]

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

Definition at line 127 of file DiscretePFInputsIO.h.

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  }

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

◆ readFromFile() [4/6]

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

Definition at line 45 of file DiscretePFInputsIO.h.

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  }

References FrontierConditions_GlobalTag_cff::file, and OrderedSet::t.

◆ readFromFile() [5/6]

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

Definition at line 84 of file DiscretePFInputsIO.h.

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  }

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

◆ readFromFile() [6/6]

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

Definition at line 65 of file DiscretePFInputsIO.h.

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  }

References FrontierConditions_GlobalTag_cff::file, readFromFile(), and OrderedSet::t.

◆ readManyFromFile()

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

Definition at line 105 of file DiscretePFInputsIO.h.

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  }

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

Referenced by readFromFile().

◆ writeManyToFile()

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

Definition at line 97 of file DiscretePFInputsIO.h.

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  }

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

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

◆ writeToFile() [1/6]

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

Definition at line 11 of file DiscretePFInputsIO.h.

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  }

References HltBtagPostValidation_cff::c, and FrontierConditions_GlobalTag_cff::file.

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

◆ writeToFile() [2/6]

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

Definition at line 93 of file DiscretePFInputsIO.h.

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

References FrontierConditions_GlobalTag_cff::file.

◆ writeToFile() [3/6]

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

Definition at line 113 of file DiscretePFInputsIO.h.

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  }

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

◆ writeToFile() [4/6]

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

Definition at line 34 of file DiscretePFInputsIO.h.

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  }

References FrontierConditions_GlobalTag_cff::file, and OrderedSet::t.

◆ writeToFile() [5/6]

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

Definition at line 77 of file DiscretePFInputsIO.h.

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  }

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

◆ writeToFile() [6/6]

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

Definition at line 56 of file DiscretePFInputsIO.h.

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  }

References FrontierConditions_GlobalTag_cff::file, OrderedSet::t, and writeToFile().

mps_fire.i
i
Definition: mps_fire.py:355
cms::cuda::assert
assert(be >=bs)
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
OrderedSet.t
t
Definition: OrderedSet.py:90
l1tpf_impl::readManyFromFile
void readManyFromFile(std::vector< T > &objs, FILE *file)
Definition: DiscretePFInputsIO.h:105
l1tpf_impl::writeManyToFile
void writeManyToFile(const std::vector< T > &objs, FILE *file)
Definition: DiscretePFInputsIO.h:97
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
alignCSCRings.r
r
Definition: alignCSCRings.py:93
l1tpf_impl::readFromFile
void readFromFile(InputRegion &r, FILE *file)
Definition: DiscretePFInputsIO.h:127
l1tpf_impl::writeToFile
void writeToFile(const InputRegion &r, FILE *file)
Definition: DiscretePFInputsIO.h:113
HLTEGTnPMonitor_cfi.objs
objs
Definition: HLTEGTnPMonitor_cfi.py:1018