void get_raw_data() { char m_w[10]; int age; char school[10]; char sal_mum[40]; char perc_mum[20]; char sal_dad[40]; char perc_dad[20]; int like_air; int like_train; int like_car; int like_moto; int like_byc; int like_stop; int like_bus; int like_camp; int like_ship; int like_other; int cheap_air; int cheap_train; int cheap_car; int cheap_moto; int cheap_byc; int cheap_stop; int cheap_bus; int cheap_camp; int cheap_ship; int cheap_other; int eco_air; int eco_train; int eco_car; int eco_moto; int eco_byc; int eco_stop; int eco_bus; int eco_camp; int eco_ship; int eco_other; int acc_camping; int acc_hotel; int acc_y_hostel; int acc_bb; int acc_hostel; int acc_app; int acc_chal; int acc_ship; int acc_sac; int acc_other; char add_on_disco[20]; char add_on_TV[20]; char add_on_beach[20]; char add_on_sport[20]; char add_on_WLAN[20]; char add_on_pool[20]; char add_on_HP[20]; char add_on_VP[20]; char add_on_trip[20]; char add_on_none[20]; char add_on_other[20]; int acc_comf; int acc_lux; int acc_ok; int acc_clean; int dream_vac_north_EU; int dream_vac_s_east_EU; int dream_vac_USA; int dream_vac_stan; int dream_vac_south_EU; int dream_vac_north_Afr; int dream_vac_south_Asia; int dream_vac_de_EU; int dream_vac_south_Afr; int dream_vac_south_US; int dream_vac_Sowj; int dream_vac_china; int dream_vac_ozean; int dream_vac_north_US; int dream_vac_n_east_EU; int crit_dist; int crit_warm; int crit_cold; int crit_prize; int crit_acc; int crit_night; int crit_mount; int crit_action; int crit_sights; int crit_rich; int crit_sport; int crit_events; int crit_concert; int crit_mark; int crit_mus; int crit_poli; int crit_eco; char where_book[20]; char where_info_agency[20]; char where_info_privat[20]; char where_info_direct[20]; char where_info_online[20]; char where_info_friends[20]; char where_info_internet[20]; char where_info_guide[20]; char where_info_katalog[20]; int best_cons_agency; int best_cons_private; int best_cons_direct; int best_cons_online; int exp_action; int exp_recovery; int exp_sights; int exp_cult; int exp_fun; int exp_new_friends; int exp_nothing; char who[10]; int kind_study; int kind_round; int kind_culture; int kind_party; int kind_indiv; int kind_langu; int kind_beach; int kind_activ; int kind_camping; int kind_safari; int kind_history; int kind_exped; int kind_hike; int kind_sport; // create File TFile f_root("test_tree.root", "RECREATE"); // create Tree TTree *t = new TTree("T", "an example"); // create Branches t->Branch("m_w",&m_w,"m_w[10]/C"); t->Branch("age",&age,"age/I"); t->Branch("school",&school,"school[10]/C"); t->Branch("sal_mum",&sal_mum,"sal_mum[40]/C"); t->Branch("perc_mum",&perc_mum,"perc_mum[20]/C"); t->Branch("sal_dad",&sal_dad,"sal_dad[40]/C"); t->Branch("perc_dad",&perc_dad,"perc_dad[20]/C"); t->Branch("like_air",&like_air,"like_air/I"); t->Branch("like_train",&like_train,"like_train/I"); t->Branch("like_car",&like_car,"like_car/I"); t->Branch("like_moto",&like_moto,"like_moto/I"); t->Branch("like_byc",&like_byc,"like_byc/I"); t->Branch("like_stop",&like_stop,"like_stop/I"); t->Branch("like_bus",&like_car,"like_car/I"); t->Branch("like_camp",&like_camp,"like_camp/I"); t->Branch("like_ship",&like_ship,"like_ship/I"); t->Branch("like_other",&like_other,"like_other/I"); t->Branch("cheap_air",&cheap_air,"cheap_air/I"); t->Branch("cheap_train",&cheap_train,"cheap_train/I"); t->Branch("cheap_car",&cheap_car,"cheap_car/I"); t->Branch("cheap_moto",&cheap_moto,"cheap_moto/I"); t->Branch("cheap_byc",&cheap_byc,"cheap_byc/I"); t->Branch("cheap_stop",&cheap_stop,"cheap_stop/I"); t->Branch("cheap_bus",&cheap_bus,"cheap_bus/I"); t->Branch("cheap_camp",&cheap_camp,"cheap_camp/I"); t->Branch("cheap_ship",&cheap_ship,"cheap_ship/I"); t->Branch("cheap_other",&cheap_other,"cheap_other/I"); t->Branch("eco_air",&eco_air,"eco_air/I"); t->Branch("eco_train",&eco_train,"eco_train/I"); t->Branch("eco_car",&eco_car,"eco_car/I"); t->Branch("eco_moto",&eco_moto,"eco_moto/I"); t->Branch("eco_byc",&eco_byc,"eco_byc/I"); t->Branch("eco_stop",&eco_stop,"eco_stop/I"); t->Branch("eco_bus",&eco_bus,"eco_bus/I"); t->Branch("eco_camp",&eco_camp,"eco_camp/I"); t->Branch("eco_ship",&eco_ship,"eco_ship/I"); t->Branch("eco_other",&eco_other,"eco_other/I"); t->Branch("acc_camping",&acc_camping,"acc_camping/I"); t->Branch("acc_hotel",&acc_hotel,"acc_hotel/I"); t->Branch("acc_y_hostel",&acc_y_hostel,"acc_y_hostel/I"); t->Branch("acc_bb",&acc_bb,"acc_bb/I"); t->Branch("acc_hostel",&acc_hostel,"acc_hostel/I"); t->Branch("acc_app",&acc_app,"acc_app/I"); t->Branch("acc_chal",&acc_chal,"acc_chal/I"); t->Branch("acc_ship",&acc_ship,"acc_ship/I"); t->Branch("acc_sac",&acc_sac,"acc_sac/I"); t->Branch("acc_other",&acc_other,"acc_other/I"); t->Branch("add_on_disco",&add_on_disco,"add_on_disco[20]/C"); t->Branch("add_on_TV",&add_on_TV,"add_on_TV[20]/C"); t->Branch("add_on_beach",&add_on_beach,"add_on_beach[20]/C"); t->Branch("add_on_sport",&add_on_sport,"add_on_sport[20]/C"); t->Branch("add_on_WLAN",&add_on_WLAN,"add_on_WLAN[20]/C"); t->Branch("add_on_pool",&add_on_pool,"add_on_pool[20]/C"); t->Branch("add_on_HP",&add_on_HP,"add_on_HP[20]/C"); t->Branch("add_on_VP",&add_on_VP,"add_on_VP[20]/C"); t->Branch("add_on_trip",&add_on_trip,"add_on_trip[20]/C"); t->Branch("add_on_none",&add_on_none,"add_on_none[20]/C"); t->Branch("add_on_other",&add_on_other,"add_on_other[20]/C"); t->Branch("acc_comf",&acc_comf,"acc_comf/I"); t->Branch("acc_lux",&acc_lux,"acc_lux/I"); t->Branch("acc_ok",&acc_ok,"acc_ok/I"); t->Branch("acc_clean",&acc_clean,"acc_clean/I"); t->Branch("dream_vac_north_EU",&dream_vac_north_EU,"dream_vac_north_EU/I"); t->Branch("dream_vac_s_east_EU",&dream_vac_s_east_EU,"dream_vac_s_east_EU/I"); t->Branch("dream_vac_USA",&dream_vac_USA,"dream_vac_USA/I"); t->Branch("dream_vac_stan",&dream_vac_stan,"dream_vac_stan/I"); t->Branch("dream_vac_south_EU",&dream_vac_south_EU,"dream_vac_south_EU/I"); t->Branch("dream_vac_north_Afr",&dream_vac_north_Afr,"dream_vac_north_Afr/I"); t->Branch("dream_vac_south_Asia",&dream_vac_south_Asia,"dream_vac_south_Asia/I"); t->Branch("dream_vac_de_EU",&dream_vac_de_EU,"dream_vac_de_EU/I"); t->Branch("dream_vac_south_Afr",&dream_vac_south_Afr,"dream_vac_south_Afr/I"); t->Branch("dream_vac_south_US",&dream_vac_south_US,"dream_vac_south_US/I"); t->Branch("dream_vac_Sowj",&dream_vac_Sowj,"dream_vac_Sowj/I"); t->Branch("dream_vac_china",&dream_vac_china,"dream_vac_china/I"); t->Branch("dream_vac_ozean",&dream_vac_ozean,"dream_vac_ozean/I"); t->Branch("dream_vac_north_US",&dream_vac_north_US,"dream_vac_north_US/I"); t->Branch("dream_vac_n_east_EU",&dream_vac_n_east_EU,"dream_vac_n_east_EU/I"); t->Branch("crit_dist",&crit_dist,"crit_dist/I"); t->Branch("crit_warm",&crit_warm,"crit_warm/I"); t->Branch("crit_cold",&crit_cold,"crit_cold/I"); t->Branch("crit_prize",&crit_prize,"crit_prize/I"); t->Branch("crit_acc",&crit_acc,"crit_acc/I"); t->Branch("crit_night",&crit_night,"crit_night/I"); t->Branch("crit_mount",&crit_mount,"crit_mount/I"); t->Branch("crit_action",&crit_action,"crit_action/I"); t->Branch("crit_sights",&crit_sights,"crit_sights/I"); t->Branch("crit_rich",&crit_rich,"crit_rich/I"); t->Branch("crit_sport",&crit_sport,"crit_sport/I"); t->Branch("crit_events",&crit_events,"crit_events/I"); t->Branch("crit_concert",&crit_concert,"crit_concert/I"); t->Branch("crit_mark",&crit_mark,"crit_mark/I"); t->Branch("crit_mus",&crit_mus,"crit_mus/I"); t->Branch("crit_poli",&crit_poli,"crit_poli/I"); t->Branch("crit_eco",&crit_eco,"crit_eco/I"); t->Branch("where_book",&where_book,"where_book[20]/C"); t->Branch("where_info_agency",&where_info_agency,"where_info_agency[20]/C"); t->Branch("where_info_privat",&where_info_privat,"where_info_privat[20]/C"); t->Branch("where_info_direct",&where_info_direct,"where_info_direct[20]/C"); t->Branch("where_info_online",&where_info_online,"where_info_online[20]/C"); t->Branch("where_info_friends",&where_info_friends,"where_info_friends[20]/C"); t->Branch("where_info_internet",&where_info_internet,"where_info_internet[20]/C"); t->Branch("where_info_guide",&where_info_guide,"where_info_guide[20]/C"); t->Branch("where_info_katalog",&where_info_katalog,"where_info_katalog[20]/C"); t->Branch("best_cons_agency",&best_cons_agency,"best_cons_agency/I"); t->Branch("best_cons_private",&best_cons_private,"best_cons_private/I"); t->Branch("best_cons_direct",&best_cons_direct,"best_cons_direct/I"); t->Branch("best_cons_online",&best_cons_online,"best_cons_online/I"); t->Branch("exp_action",&exp_action,"exp_action/I"); t->Branch("exp_recovery",&exp_recovery,"exp_recovery/I"); t->Branch("exp_sights",&exp_sights,"exp_sights/I"); t->Branch("exp_cult",&exp_cult,"exp_cult/I"); t->Branch("exp_fun",&exp_fun,"exp_fun/I"); t->Branch("exp_new_friends",&exp_new_friends,"exp_new_friends/I"); t->Branch("exp_nothing",&exp_nothing,"exp_nothing/I"); t->Branch("who",&who,"who[10]/C"); t->Branch("kind_study",&kind_study,"kind_study/I"); t->Branch("kind_round",&kind_round,"kind_round/I"); t->Branch("kind_culture",&kind_culture,"kind_culture/I"); t->Branch("kind_party",&kind_party,"kind_party/I"); t->Branch("kind_indiv",&kind_indiv,"kind_indiv/I"); t->Branch("kind_langu",&kind_langu,"kind_langu/I"); t->Branch("kind_beach",&kind_beach,"kind_beach/I"); t->Branch("kind_activ",&kind_activ,"kind_activ/I"); t->Branch("kind_camping",&kind_camping,"kind_camping/I"); t->Branch("kind_safari",&kind_safari,"kind_safari/I"); t->Branch("kind_history",&kind_history,"kind_history/I"); t->Branch("kind_exped",&kind_exped,"kind_exped/I"); t->Branch("kind_hike",&kind_hike,"kind_hike/I"); t->Branch("kind_sport",&kind_sport,"kind_sport/I"); // open File with raw Data FILE *f_raw = fopen("raw_date.csv","r"); //Fill Tree // num1 = 5; // strcpy(string1,"Alen"); // strcpy(string2,"Mike"); // num2 = 7; // t->Fill(); f_root.Write(); f_root.Close(); }