Skip to content

AthenaConfiguration+AthenaPoolCnvSvc: Add a configuration flag for setting the POOL storage technology

With this MR we're adding a new configuration flag that allows setting the underlying POOL storage technology. One can use this to switch between TTree and RNtuple following @mnowak's !59697 (merged) (for now only in the master--dev3LCG nightly). Just for fun, I created a DAOD_PHYS file w/

Derivation_tf.py \                           
  --CA 'True' \
  --maxEvents '1000' \                       
  --perfmon 'fullmonmt' \                    
  --preExec 'ConfigFlags.Output.StorageTechnology="ROOTRNTUPLE";' \
  --inputAODFile '/eos/atlas/atlascerngroupdisk/proj-spot/spot-job-inputs/AODtoDAOD/data22/myAOD.pool.root' \
  --outputDAODFile 'pool.root' \
  --formats 'PHYSLITE'

The file validation doesn't really understand RNtuple at this point but we actually write out a file as:

$ root -l DAOD_PHYSLITE.pool.root 
root [0] 
Attaching file DAOD_PHYSLITE.pool.root as _file0...
(TFile *) 0x3c1bdf0
root [1] .ls
TFile**         DAOD_PHYSLITE.pool.root
 TFile*         DAOD_PHYSLITE.pool.root
  KEY: TTree    ##Params;8      ##Params [current cycle]
  KEY: TTree    ##Params;7      ##Params [backup cycle]
  KEY: TTree    ##Params;6      ##Params [backup cycle]
  KEY: TTree    ##Params;5      ##Params [backup cycle]
  KEY: TTree    ##Params;4      ##Params [backup cycle]
  KEY: TTree    ##Params;3      ##Params [backup cycle]
  KEY: TTree    ##Params;2      ##Params [backup cycle]
  KEY: TTree    ##Params;1      ##Params [backup cycle]
  KEY: TTree    ##Shapes;8      ##Shapes [current cycle]
  KEY: TTree    ##Shapes;7      ##Shapes [backup cycle]
  KEY: TTree    ##Shapes;6      ##Shapes [backup cycle]
  KEY: TTree    ##Shapes;5      ##Shapes [backup cycle]
  KEY: TTree    ##Shapes;4      ##Shapes [backup cycle]
  KEY: TTree    ##Shapes;3      ##Shapes [backup cycle]
  KEY: TTree    ##Shapes;2      ##Shapes [backup cycle]
  KEY: TTree    ##Shapes;1      ##Shapes [backup cycle]
  KEY: TTree    ##Links;8       ##Links [current cycle]
  KEY: TTree    ##Links;7       ##Links [backup cycle]
  KEY: TTree    ##Links;6       ##Links [backup cycle]
  KEY: TTree    ##Links;5       ##Links [backup cycle]
  KEY: TTree    ##Links;4       ##Links [backup cycle]
  KEY: TTree    ##Links;3       ##Links [backup cycle]
  KEY: TTree    ##Links;2       ##Links [backup cycle]
  KEY: TTree    ##Links;1       ##Links [backup cycle]
  KEY: TTree    POOLCollectionTree;7    POOLCollectionTree [current cycle]
  KEY: TTree    POOLCollectionTree;6    POOLCollectionTree [backup cycle]
  KEY: TTree    POOLCollectionTree;5    POOLCollectionTree [backup cycle]
  KEY: TTree    POOLCollectionTree;4    POOLCollectionTree [backup cycle]
  KEY: TTree    POOLCollectionTree;3    POOLCollectionTree [backup cycle]
  KEY: TTree    POOLCollectionTree;2    POOLCollectionTree [backup cycle]
  KEY: TTree    POOLCollectionTree;1    POOLCollectionTree [backup cycle]
  KEY: ROOT::Experimental::RNTuple      RNT:CollectionTree;1    object title
  KEY: ROOT::Experimental::RNTuple      RNT:MetaData;1  object title
  KEY: ROOT::Experimental::RNTuple      RNT:MetaDataHdr;1       object title
  KEY: ROOT::Experimental::RNTuple      RNT:MetaDataHdrForm;1   object title
  KEY: ROOT::Experimental::RNTuple      RNT:POOLContainer;1     object title
  KEY: ROOT::Experimental::RNTuple      RNT:POOLContainerForm;1 object title

I think the full DAOD file (w/ element links etc.) is a bit too much at this point but one can get some basic stuff like the number of entries out of the box:

$ root -l 
root [0] using RNTupleReader = ROOT::Experimental::RNTupleReader;
root [1] auto ntuple = RNTupleReader::Open("RNT:CollectionTree", "DAOD_PHYSLITE.pool.root");
Warning in <[ROOT.NTuple] Warning /build/jenkins/workspace/lcg_nightly_pipeline/build/projects/ROOT-HEAD/src/ROOT/HEAD/tree/ntuple/v7/src/RNTupleSerialize.cxx:1180 in static ROOT::Experimental::RResult<void> ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeaderV1(const void*, uint32_t, ROOT::Experimental::RNTupleDescriptorBuilder&)>: Pre-release format version: RC 1
root [2] ntuple->GetNEntries()
(unsigned long) 1000

Actually producing a more modest AOD file w/ only basic information, e.g., EventInfo, one can get even more:

$ root -l 
root [0] using RNTupleReader = ROOT::Experimental::RNTupleReader;
root [1] auto ntuple = RNTupleReader::Open("RNT:CollectionTree", "myAOD.pool.root");
Warning in <[ROOT.NTuple] Warning /build/jenkins/workspace/lcg_nightly_pipeline/build/projects/ROOT-HEAD/src/ROOT/HEAD/tree/ntuple/v7/src/RNTupleSerialize.cxx:1180 in static ROOT::Experimental::RResult<void> ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeade
rV1(const void*, uint32_t, ROOT::Experimental::RNTupleDescriptorBuilder&)>: Pre-release format version: RC 1
root [2] ntuple->GetNEntries()
(unsigned long) 10
root [3] ntuple->PrintInfo()
************************************ NTUPLE ************************************
* N-Tuple : RNT:CollectionTree                                                 *
* Entries : 10                                                                 *
********************************************************************************
* Field 1                : EventInfoAux_ (xAOD::EventAuxInfo_v3)               *
*   Field 1.1            : :_0 (xAOD::AuxInfoBase)                             *
*     Field 1.1.1        : :_0 (SG::IAuxStore)                                 *
*       Field 1.1.1.1    : :_0 (SG::IConstAuxStore)                            *
*     Field 1.1.2        : :_1 (SG::IAuxStoreIO)                               *
*     Field 1.1.3        : :_2 (SG::IAuxStoreHolder)                           *
*     Field 1.1.4        : :_3 (ILockable)                                     *
*   Field 1.2            : runNumber (std::uint32_t)                           *
*   Field 1.3            : eventNumber (std::uint64_t)                         *
*   Field 1.4            : lumiBlock (std::uint32_t)                           *
*   Field 1.5            : timeStamp (std::uint32_t)                           *
*   Field 1.6            : timeStampNSOffset (std::uint32_t)                   *
*   Field 1.7            : bcid (std::uint32_t)                                *
*   Field 1.8            : detectorMask0 (std::uint32_t)                       *
*   Field 1.9            : detectorMask1 (std::uint32_t)                       *
*   Field 1.10           : detectorMask2 (std::uint32_t)                       *
*   Field 1.11           : detectorMask3 (std::uint32_t)                       *
*   Field 1.12           : detDescrTags (std::vector<std::pair<std::string,s...*
*     Field 1.12.1       : _0 (std::pair<std::string,std::string>)             *
*       Field 1.12.1.1   : _0 (std::string)                                    *
*       Field 1.12.1.2   : _1 (std::string)                                    *
*   Field 1.13           : eventTypeBitmask (std::uint32_t)                    *
*   Field 1.14           : statusElement (std::uint32_t)                       *
*   Field 1.15           : extendedLevel1ID (std::uint32_t)                    *
*   Field 1.16           : level1TriggerType (std::uint16_t)                   *
*   Field 1.17           : streamTagNames (std::vector<std::string>)           *
*     Field 1.17.1       : _0 (std::string)                                    *
*   Field 1.18           : streamTagTypes (std::vector<std::string>)           *
*     Field 1.18.1       : _0 (std::string)                                    *
*   Field 1.19           : streamTagObeysLumiblock (std::vector<char>)         *
*     Field 1.19.1       : _0 (char)                                           *
*   Field 1.20           : pixelFlags (std::uint32_t)                          *
*   Field 1.21           : sctFlags (std::uint32_t)                            *
*   Field 1.22           : trtFlags (std::uint32_t)                            *
*   Field 1.23           : larFlags (std::uint32_t)                            *
*   Field 1.24           : tileFlags (std::uint32_t)                           *
*   Field 1.25           : muonFlags (std::uint32_t)                           *
*   Field 1.26           : forwardDetFlags (std::uint32_t)                     *
*   Field 1.27           : coreFlags (std::uint32_t)                           *
*   Field 1.28           : backgroundFlags (std::uint32_t)                     *
*   Field 1.29           : lumiFlags (std::uint32_t)                           *
* Field 2                : EventInfo (xAOD::EventInfo_v1)                      *
*   Field 2.1            : :_0 (SG::AuxElement)                                *
*     Field 2.1.1        : :_0 (SG::IAuxElement)                               *
********************************************************************************
root [4] ntuple->Show(0)
{
  "EventInfoAux_": {
    ":_0": {
      ":_0": {
        ":_0": {        }
      },
      ":_1": {      },
      ":_2": {      },
      ":_3": {      }
    },
    "runNumber": 437548,
    "eventNumber": 2180414700,
    "lumiBlock": 1666,
    "timeStamp": 1666250211,
    "timeStampNSOffset": 731798850,
    "bcid": 1923,
    "detectorMask0": 4294967287,
    "detectorMask1": 2097179132,
    "detectorMask2": 127,
    "detectorMask3": 0,
    "detDescrTags": [],
    "eventTypeBitmask": 0,
    "statusElement": 268435464,
    "extendedLevel1ID": 4093647651,
    "level1TriggerType": 132,
    "streamTagNames": ["Main"],
    "streamTagTypes": ["physics"],
    "streamTagObeysLumiblock": [],
    "pixelFlags": 0,
    "sctFlags": 0,
    "trtFlags": 0,
    "larFlags": 0,
    "tileFlags": 65551,
    "muonFlags": 0,
    "forwardDetFlags": 0,
    "coreFlags": 528384,
    "backgroundFlags": 147626,
    "lumiFlags": 0
  },
  "EventInfo": {
    ":_0": {
      ":_0": {      }
    }
  }
}

cc @gemmeren @mnowak

Merge request reports