|
|
Go to the documentation of this file.
9 #include "boost/filesystem/operations.hpp"
22 for (
int i = 2;
i < 9;
i++)
25 for (
int i = 13;
i < 19;
i++)
113 std::cout <<
"Writing XML..." << std::endl;
114 std::ofstream* of =
nullptr;
120 std::cerr <<
"XML output file " <<
name <<
" is bad." << std::endl;
123 (*of) <<
"<?xml version='1.0' encoding='UTF-8'?>" << std::endl;
135 snprintf(cr_name, 256,
"_crate_%d.xml", crate);
139 std::cerr <<
"XML output file " <<
name <<
" is bad." << std::endl;
143 (*of) <<
"<?xml version='1.0' encoding='UTF-8'?>" << std::endl;
148 for (
int tb = 0; tb <= 1; tb++) {
152 for (
int fiber = 1; fiber <= 8; fiber++) {
156 snprintf(cr_name, 256,
"_crate_%d_slot_%d_tb_%d_fiber_%d.xml", crate, slot, tb, fiber);
160 std::cerr <<
"XML output file " <<
name <<
" is bad." << std::endl;
164 (*of) <<
"<?xml version='1.0' encoding='UTF-8'?>" << std::endl;
178 (*of) <<
"</CFGBrickSet>" << std::endl;
187 (*of) <<
"</CFGBrickSet>" << std::endl;
195 std::cout <<
"Writing root file..." << std::endl;
197 TFile of(
name.c_str(),
"RECREATE");
199 std::cerr <<
"root output file " <<
name <<
" is bad." << std::endl;
210 for (
int tb = 0; tb <= 1; tb++) {
217 sprintf(hname,
"Exact fC Cr%d,%d%s-%d", crate, slot, ((tb == 1) ? (
"t") : (
"b")),
chan);
219 hp->SetDirectory(
nullptr);
220 sprintf(hname,
"Quantized fC Cr%d,%d%s-%d", crate, slot, ((tb == 1) ? (
"t") : (
"b")),
chan);
222 hp->SetDirectory(
nullptr);
223 sprintf(hname,
"Encoded fC Cr%d,%d%s-%d", crate, slot, ((tb == 1) ? (
"t") : (
"b")),
chan);
225 ha->SetDirectory(
nullptr);
227 hp->Fill(
i * 1.0, (*
cp)[
i]);
228 hq->Fill(
i * 1.0,
cp->getQuantized(
i));
229 ha->Fill(
i * 1.0,
cp->getCoded(
i));
std::vector< T >::const_iterator const_iterator
constexpr int readoutVMECrateId() const
get the readout VME crate number
constexpr int htrSlot() const
get the htr slot
ChannelPattern * getPattern(int chan)
static const int NUM_CRATES
Readout chain identification for Hcal.
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
void setSpigot(int spigot)
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
static const int NUM_SLOTS
char data[epos_bytes_allocation]
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
CrateData * getCrate(int crate)
void writePattern(HalfHtrData *spigotData, int fiber, std::ostream &os, int level=0)
constexpr int htrChanId() const
get the HTR channel id (1-24)
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
void setTagName(std::string tn)