DAS  3.0
Das Analysis System
common.cc File Reference
#include "Core/JEC/bin/common.h"
#include <boost/test/included/unit_test.hpp>
#include <iostream>
+ Include dependency graph for common.cc:

Macros

#define DOXYGEN_SHOULD_SKIP_THIS
 
#define BOOST_TEST_MODULE   applyJEScorrections
 

Functions

 BOOST_AUTO_TEST_CASE (get_short_campaign)
 
 BOOST_AUTO_TEST_CASE (get_algo)
 
 BOOST_AUTO_TEST_CASE (get_R)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   applyJEScorrections

◆ DOXYGEN_SHOULD_SKIP_THIS

#define DOXYGEN_SHOULD_SKIP_THIS

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( get_algo  )
24 {
25  DT::UserInfo userinfo;
26 
27  userinfo.Set<int>("flags", "year", 2018);
28  BOOST_TEST( GetAlgo(userinfo) == "chs" );
29 
30  userinfo.Set<const char *>("flags", "labels", "PUPPI");
31  BOOST_TEST( GetAlgo(userinfo) == "Puppi" );
32 }

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( get_R  )
35 {
36  DT::UserInfo userinfo;
37 
38  userinfo.Set<int>("flags", "year", 2018);
39  userinfo.Set<int>("flags", "R", 7);
40 
41  BOOST_TEST( GetR(userinfo) == 8 );
42 }

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( get_short_campaign  )
17 {
18  BOOST_TEST( GetShortCampaign("Summer19UL18_") == "Summer19UL18"s );
19  BOOST_TEST( GetShortCampaign("Summer19UL18_RunA_") == "Summer19UL18"s );
20  BOOST_REQUIRE_THROW( GetShortCampaign("BOOOM"), boost::wrapexcept<invalid_argument> );
21 }
BOOST_TEST
BOOST_TEST(gendijet.Rapidity()==1.3573785791881385)
DAS::JetEnergy::GetShortCampaign
std::string GetShortCampaign(const std::string &campaign)
Extracts for isntance Summer19UL18 from Summer19UL18_RunA
Definition: common.h:106
DAS::JetEnergy::GetR
int GetR(const Darwin::Tools::UserInfo &metainfo)
Determine the R values for which JetMET provides corrections.
Definition: common.h:164
Darwin::Tools::UserInfo::Set
void Set(TList *mother, const char *key, T value) const
Definition: UserInfo.h:129
Darwin::Tools::UserInfo
Generic meta-information for n-tuple (can be used out of Darwin).
Definition: UserInfo.h:52
DAS::JetEnergy::GetAlgo
std::string GetAlgo(const Darwin::Tools::UserInfo &metainfo)
Determine from metainfo if CHS or PUPPI has been used to reconstruct the jets.
Definition: common.h:90