Hi, I know this has been asked before and the basic.c and basic2.c are example of how to do it. However the file I have is much more complicated and with the additional problem the csv file has Japanese characters for some of the parameters(I would like to keep the parameter name as it is so my colleague can use root files). I think would give a try asking for help.
The example csv file I have contain the first 20 lines about information about the daq settings which i would want to put in a txt file so I can refer later.
from line 21 onwards, the csv file would look like this
スキャン,時刻,101 <DigitalGauge1> (VDC),アラーム 101,102 <DigitalGauge2> (VDC),アラーム 102,103 <DigitalGauge3> (VDC),アラーム 103,104 <DigitalGauge4> (VDC),アラーム 104,105 <DigitalGauge5> (VDC),アラーム 105,106 <PiraniGauge> (VDC),アラーム 106,107 (VDC),アラーム 107,108 (VDC),アラーム 108,109 (VDC),アラーム 109,110 (VDC),アラーム 110,111 (VDC),アラーム 111,112 (VDC),アラーム 112,113 <1KPot> (VDC),アラーム 113,114 <MixingChamber> (VDC),アラーム 114,115 <HeatExchanger> (OHM),アラーム 115,116 <Still> (OHM),アラーム 116
1,2017/03/22 21:08:21:256,3.0216646,0,2.996026,0,2.999162,0,2.9948355,0,3.021831,0,0.009563304,0,0.005924331,0,-0.011202323,0,-0.000468457,0,-0.062406373,0,-0.039981009,0,-0.017782287,0,0.1360781,0,0.1006473,0,2165.986,0,6376.459,0
2,2017/03/22 21:08:31:239,3.0215494,0,2.996026,0,2.9992004,0,2.9948483,0,3.021895,0,0.009562658,0,-0.019853747,0,-0.001696982,0,0.035609786,0,-0.006360003,0,0.011028187,0,-0.022275683,0,0.1358348,0,0.1007241,0,2165.857,0,6382.348,0
........
where the rest are values recorded by the daq as the 2 lines above in repeating fashion.
I would like to convert the data from line 21 onwards into root format with each tree corresponds to the parameter name in the first line of line21 onwards.
There is a bit too much things I am trying to include here. To start off I modified the basic.c example together with the answer i found here http://stackoverflow.com/questions/31420191/converting-900-mb-csv-into-root-cern-ttree. But I know with that the code would not work since there are additional stuff i am trying incoperate here.
Apologies if this looks like I am asking too much.
Danny