  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   18 #include "CoralBase/Blob.h" 
   19 #include "CoolKernel/IObject.h" 
   31 const unsigned int TOTAL_LHC_BCIDS = 3564;
 
   46   return StatusCode::SUCCESS;
 
   62                                 std::vector<float>& rawLumiOut)
 const 
   68   unsigned int bss = ((*pchar) % 100) / 10;  
 
   69   unsigned int smod = ((*pchar) % 10);       
 
   71   ATH_MSG_DEBUG( 
"BunchRawInstLumi blob found with storage mode " << smod << 
" and byte storage size " << bss );
 
   74   unsigned int bloblength = 0;
 
   75   unsigned int nbcids = 0;
 
   87       return StatusCode::SUCCESS;
 
   91     bloblength = bss * nbcids + 1;
 
   96     nbcids = TOTAL_LHC_BCIDS;
 
   97     bloblength = bss * nbcids + 1;
 
  104     bloblength = (2+bss)*nbcids + 3;  
 
  110     ATH_MSG_ERROR( 
"BunchRawInstLumi blob found with unknown storage mode " << smod << 
"!" );
 
  111     return StatusCode::FAILURE;
 
  115   if (
static_cast<cool::UInt32
>(
blob.size()) != bloblength) {
 
  117                    " in storage mode " << smod <<  
" with size " << bss <<
 
  118                    ", expecting " << bloblength << 
"!" );
 
  119     return StatusCode::FAILURE;
 
  124   std::vector<float> rawLumi;
 
  126   rawLumi.reserve (nbcids);
 
  133     float scale = avgRawLumi / 100;
 
  134     for (
unsigned int i=0; 
i<nbcids; 
i++) {
 
  136       rawLumi.push_back(
val);
 
  142     float scale = avgRawLumi / (100*100);
 
  143     for (
unsigned int i=0; 
i<nbcids; 
i++) {
 
  145       rawLumi.push_back(
val);
 
  151     for (
unsigned int i=0; 
i<nbcids; 
i++) {
 
  157     for (
unsigned int i=0; 
i<nbcids; 
i++) {
 
  163     ATH_MSG_ERROR( 
"BunchRawInstLumi blob found with unknown byte storage size " << bss << 
"!" );
 
  164     return StatusCode::FAILURE;
 
  175     rawLumiOut.resize (TOTAL_LHC_BCIDS, 0);
 
  176     for (
unsigned int i=0; 
i<nbcids; 
i++)
 
  182     rawLumiOut = std::move (rawLumi);
 
  187     rawLumiOut.resize (TOTAL_LHC_BCIDS, 0);
 
  188     for (
unsigned int i=0; 
i<nbcids; 
i++) {
 
  198   return StatusCode::SUCCESS;
 
  210   auto lumis = std::make_unique<BunchLumisCondData>();
 
  222     EventIDRange fpRange;
 
  227   for (
const auto& 
p : *bunchLumisFolder.
retrieve()) {
 
  231     if (attrList[
"BunchRawInstLum"].isNull()) {
 
  233       return StatusCode::FAILURE;
 
  237     if (
blob.size() == 0) {
 
  243     if (attrList[
"AverageRawInstLum"].isNull()) {
 
  245       return StatusCode::FAILURE;
 
  247     float avgRawLumi = attrList[
"AverageRawInstLum"].data<cool::Float>();
 
  249     std::vector<float> rawLumis;
 
  251     lumis->addChannel (
channel, std::move (rawLumis));
 
  257   return StatusCode::SUCCESS;
 
  
SG::ReadCondHandleKey< FillParamsCondData > m_fillParamsInputKey
Fill parameters needed for storage mode 0.
 
Conditions algorithm to unpack raw luminosity data from COOL.
 
const std::vector< unsigned int > & luminousBunches() const
 
Helper to enable (more agressive) auto-vectorization.
 
StatusCode unpackLumis(const coral::Blob &blob, const std::vector< unsigned int > &luminousBunches, float avgRawLumi, std::vector< float > &rawLumiOut) const
Unpack raw luminosity data for one channel.
 
bool range(EventIDRange &r)
 
bool empty() const
Test if the key is blank.
 
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
 
float get_unaligned_float(const uint8_t *ATH_RESTRICT &p)
Read a little-endian float value from a possibly unaligned pointer.
 
const_pointer_type retrieve()
 
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm execute method.
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
SG::WriteCondHandleKey< BunchLumisCondData > m_bunchLumisOutputKey
Output conditions object.
 
uint16_t get_unaligned16(const uint8_t *ATH_RESTRICT &p)
Read a 2-byte little-endian value from a possibly unaligned pointer.
 
double get_unaligned_double(const uint8_t *ATH_RESTRICT &p)
Read a little-endian double value from a possibly unaligned pointer.
 
Read little-endian values through possibly unaligned pointers.
 
Macro wrapping the nonstandard restrict keyword.
 
ATH_ENABLE_TREE_VECTORIZATION
 
StatusCode initialize(bool used=true)
 
SG::ReadCondHandleKey< CondAttrListCollection > m_bunchLumisFolderInputKey
Input conditions object.
 
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
 
virtual StatusCode initialize() override
Gaudi initialize method.