FACT++  1.0
void DataCalib::Update ( DimDescribedService dim,
DimDescribedService runs 
)
static

Definition at line 56 of file DataCalib.cc.

References data, fData, i, Time::NightAsInt(), DimDescribedService::setData(), DimService::setQuality(), time, and DimDescribedService::Update().

Referenced by EventBuilderWrapper::LoadDrsCalibration(), and EventBuilderWrapper::SetOutputFormat().

57 {
58  const uint16_t roi = fData.fRoi;
59  const uint16_t ntm = fData.fNumTm;
60 
61  vector<float> buf(1440*1024*6+160*1024*2+4);
62 
63  memcpy(buf.data(), fStats.data(), (4*1024*1440+4)*sizeof(float));
64 
65  for (int i=0; i<1440; i++)
66  {
67  memcpy(buf.data()+4+1440*1024*4 + i*1024, fStats.data()+4 + 4*1024*1440 + roi*i, roi*sizeof(float));
68  memcpy(buf.data()+4+1440*1024*5 + i*1024, fStats.data()+4 + 4*1024*1440 + roi*1440 + roi*i, roi*sizeof(float));
69  }
70 
71  /*
72  for (int i=0; i<ntm; i++)
73  {
74  memcpy(buf.data()+4+1440*1024*6 + i*1024, fStats.data()+4 + 4*1024*1440 + 2*roi*1440, roi*sizeof(float));
75  memcpy(buf.data()+4+1440*1024*6+160*1024 + i*1024, fStats.data()+4 + 4*1024*1440 + 2*roi*1440+i*roi, roi*sizeof(float));
76  }*/
77 
78 #warning Time marker channels not sent
79 
80  const Time time(fData.fDateObs);
81  const uint32_t night = time.NightAsInt();
82 
83  dim.setQuality(fData.fStep);
84  dim.setData(buf);
85  dim.Update(time);
86 
87  vector<uint32_t> data(5);
88  memcpy(data.data(), buf.data(), 4*sizeof(uint32_t));
89  data[4] = night<19700000 ? 0 : night;
90 
91  runs.setQuality(fData.fStep);
92  runs.setData(data);
93  runs.Update(time);
94 }
static std::vector< float > fStats
Definition: DataCalib.h:15
int i
Definition: db_dim_client.c:21
void setQuality(int quality)
Definition: discpp.cxx:1256
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
uint16_t fRoi
Definition: DrsCalib.h:1318
uint16_t fNumTm
Definition: DrsCalib.h:1319
void setData(const void *ptr, size_t sz)
static DrsCalibration fData
Definition: DataCalib.h:13
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
Definition: smartfact.txt:92
float data[4 *1440]
uint32_t fStep
Definition: DrsCalib.h:1317
std::string fDateObs
Definition: DrsCalib.h:1321

+ Here is the call graph for this function:

+ Here is the caller graph for this function: